I would like to create a gotextnode where the text
a) wraps after 15 characters
b) resizes automatically even if bigger than the background shape
How do I do this?
You can do:
aTextNode.Label.Wrapping = true;
aTextNode.Label.WrappingWidth = 100;
This will get what you want, except that the wrapping will occur at a particular width, rather than at a particular number of characters. If you are using a monospace font, you can calculate the correct WrappingWidth for 15 characters.
Did you really want to wrap after 15 characters, regardless of how wide that line is, even if it doesn’t line up with the previously wrapped line?
If so, one possibility is that you can implement this wrapping yourself, by not using the GoText.Wrapping and WrappingWidth properties, but by splitting the text into separate newline-separated lines, each 15 characters. You’ll need to set GoText.Multiline to true.
But the text bounds box doesn’t seem to extend past the bounds of the background si if I have a GoTextnode with a roundedrectangle background set to sizeF(80,50) the text is only a couple of lines in size
PS Apart from this the product does everyting I want so far
Thanks - that almost works
- It mucks up the display of the nodes inthe palette (my test app based on protoapp and flowchart)
- the text label wraps after 2 characters
PS I will start a newthread for some other questions