DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

inserting long text in a programmatically created table

Hi there!

I have to create, in a programmatic way, a 2dtable where some cells have to contain a long string. As it seems to be not possible to have an automatic word-wrap, I triend to insert carriage return/line feed (vbCrLf) inside my string, but the result didn't change.
Maybe I need to set some specific table property to do that?

thank you,

andrea
0 Kudos
Message 1 of 7
(4,531 Views)
Hello Andrea!
 
You have to use a variable like TV or a text channel for every column you want to set. There is no direct way to fill a cell. In your script you only have to set the variable or channel. As you expected you have to use a vbCRLF to get multiline text. DIAdem will display multiline text but did not recognize it. That means that the program do not make a vertical alignment. The first line will be vertical centerted and all other lines will be below. Result: A white gap above the text! You have to 'play' with the cell and text height to get a half-decent text display. BTW: I made my tests with DIAdem 9.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 7
(4,520 Views)
Thank you Matthias!

now the problem is that I cannot find how to set the cell height... I know that i have to use D2TabNumSize for the text size, but I don't know which is the property to set for enlarging the row height.
Attached to this post, you can find an example of what I'm doing. As you can see, the text to insert can have different size, so i would like to fit each row in autonomous way. Is it possible?

Andrea
0 Kudos
Message 3 of 7
(4,504 Views)
Hello Andrea!
 
DIAdem 10 is improved! Smiley Sad
 
In DIAdem 9 I get multiline text, in 10 not. Sorry!
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 4 of 7
(4,496 Views)
I'm seeing that the "text object" gives more freedom in formatting tables, but I cannot find documentation about the programmatic creation of this kind of objects. Have you some information about this?
0 Kudos
Message 5 of 7
(4,490 Views)
Hello Andrea!
 
Difficult question! I can not recommend to use the textobject. This opinion is based on experience from the past and can not be explained in detail. I don't know if it possible to create/change it via script. The only thing I know is that the text is stored in the Rich Text Format (RTF).
 
Not verry helpfull. Sorry!
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 6 of 7
(4,485 Views)
Searching the forum, I found a thread named "text alignment" where an example of text object scripting is presented. Unfortunately, the involved objects and variables are not documented in Diadem literature. Anyway, your suggestion is quite clear.Smiley Wink

Thank you again for your cooperation, Matthias!

Message Edited by def90 on 12-07-2006 08:39 AM

0 Kudos
Message 7 of 7
(4,479 Views)