flash - TextField's size in Flex -
i'm converting code project flash 3 flex 4. i've got problem textfield controls. text placed in doesn't appear. i've checked thoroughly , width equal 4. no matter text placed in it, narrow. know in flex, should provide width , height explicitly components there issues:
- i don't know initial size of such field - want automatically determine size based on text stores
- there couple of other containers contain , should resize automatically too, have correct size display content of textfield.
thanks
first, i'll assume you're using uitextfield. if not, use one.
having out of way, set autosize property textfieldautosize.right, , leave width undefined. if have text multiple lines, or text won't fit in line want displayed, you'll want set width of field percentage, 100% (percentagewidth actionscript, width mxml), , leave height undefined.
if there containers need resized, i'd recommend using vbox/hbox instead of whatever you're using , leaving widths (and possibly heights) undefined on them.
labels components use textfields setup in such way resize on 1 line only. if don't want use them can check source code.
text component similar label allows multiple lines. again, advise checking out source code.
Comments
Post a Comment