This content has been marked as final. Show 5 replies
All you need to do is set the field's .text property to the text
member's .text property.
That will only bring in the text, not the formatting. If you need
formatting as well, then there is a bit more to it.
> All you need to do is set the field's .text property to the text member's
> .text property.
> That will only bring in the text, not the formatting. If you need
> formatting as well, then there is a bit more to it.
You know, one of these days I wish they'd just get around to combining the
features of Text and Field members into a single type, and then get rid of
Fields. (Keep the functionality there for legacy projects, but just make it
so that anything that works on one works on both, and there'd be no need to
ever use a Field member again.) It really seems redundant to have both, and
it's rather irritating that you can't use the same lingo to deal with them
#text and #field members are very different in many ways, and both bring
something good to the table.
#fields are MUCH faster. At least in D10 and below, they used the OS to
render the text, and generally the visual quality was terrible. They
are very useful for storing string info that does not need to be
rendered on the stage, like height maps for 3d terrains, or blocks of
text that will be used as translations or somehting where the text will
be broungh from the #field into a #text member for diaply. Their speed
is a huge asset.
#text members have all the pretty antialiasing and whatnot to make
display better, but at the cost of some speed.
Both have their place. If you are using only display text, then you
have no real need to use #fields, and that is why they are hidden away
in the menu system.
Many thanks, worked a treat. Picking up on one of points about retaining formatting - is the complex ?
I was working on a project recently where I wanted to send a rtf member with formating and using fileio open it and place its contents in various fields reatining the bold etc formatting but also retaining the text inspector hyperlink text (i.e the user opens the file which loads the text - in field A I provide a link to a website using hyperlink text)
I had now success !!
#field members have different control schemes than #text members. You
can easily set the font, color, style, etc of a whole member. If the
whole member needs the same formatting, then it is easy to take what the
#text member was set to, and set the #field the same way.
If you need more control than that, you will pretty much need to write a
script that goes character by character through the #text member and
gets the formatting info, then applies it to the #field.