all groups > flash actionscript > april 2005 >
You're in the

flash actionscript

group:

Problem with checkbox component label and word wrap


Problem with checkbox component label and word wrap sbickSubscript NO[at]SPAM bellsouth.net
4/1/2005 7:52:33 PM
flash actionscript:
I'm trying to create a checkbox using a checkbox component that has a
multiline label, wraps, and allows me to set the amount of area between
the label and the right edge of the check box (where the checkmark is
placed in a square).

The problem is that rollovers cause the text to redisplay narrower each
time the mouse is moved on or off the checkbox - rewrapping the text to
the new width. Very strange.

To recreate:

New fla (MX2004) with checkbox instance on stage named vChkBox.
Frame 1:


vChkBox.setStyle("marginLeft", 20); //adds space between chkbox and
label
vChkBox.labelPath.multiline = true;
vChkBox.labelPath.wordWrap = true; // causes the text shortening
problem when used with marginLeft
vChkBox.labelPath.autoSize = "left";
vChkBox.setLabel("this is a test of a very very ... long field");
stop();



setting the maringLeft to 0 prevents the problem but removes the
spacing I want between the checkbox and it's label.

Any ideas?

Thanks,

Steve
Re: Problem with checkbox component label and word wrap Travis Newbury
4/1/2005 11:31:32 PM
[quoted text, click to view]

Don't use the checkbox text? Just use regular static text and put it
next to the checkbox.


--
AddThis Social Bookmark Button