|
....damn, didn't think of that; I did an exact
positioning of an entirely new label on the Stage's resize:
<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="initApp();"> <mx:Script> <![CDATA[ function initApp() { onResize(); Stage.addListener(this); } function d(o)
{ debug_ta.text += o + newline; } function onResize()
{ var o = {}; o.x = my_form.x; o.y = my_form.y; o.x += main_fi.x; o.y += main_fi.y; label1.move(o.x, o.y); } ]]> </mx:Script> <mx:Canvas width="100%" height="100%"> <mx:Form id="my_form" x="109" y="83" borderColor="#003333" backgroundColor="#006699" > <mx:FormItem id="main_fi"> <mx:Button label="Button" /> </mx:FormItem> <mx:FormItem label="Hello and welcome"> <mx:Button label="Button" /> </mx:FormItem> </mx:Form> <mx:TextArea x="128" y="221" width="272" height="109" id="debug_ta" /> <mx:Text id="label1" text="Text" /> </mx:Canvas> </mx:Application> ----- Original Message -----
From: Paul
Frantz
Sent: Thursday, March 10, 2005 11:09 PM
Subject: RE: [flexcoders] Left aligned form labels Yep
:) But the following seems to do the trick...
test.mxml
<?xml version="1.0" encoding="iso-8859-1"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" > <mx:Form> <HackedFormItem label="small label" > <mx:TextInput /> </HackedFormItem> <HackedFormItem label="really big label" > <mx:TextInput /> </HackedFormItem> <HackedFormItem label="really really really big label" > <mx:TextInput /> </HackedFormItem> </mx:Form> </mx:Application>
HackedFormItem.as import mx.controls.FormItemLabel; class HackedFormItem extends mx.containers.FormItem {function layoutChildren( ):Void { super.layoutChildren();label_mc .x = 0; }} Cheers,
Paul.
|
- RE: [flexcoders] Left aligned form labels Paul Frantz
- Re: [flexcoders] Left aligned form labels JesterXL
- Re: [flexcoders] Left aligned form labels Robin Hilliard
- RE: [flexcoders] Left aligned form labels Gordon Smith

