RE: [flexcoders] Left aligned form labels

2005-03-11 Thread Paul Frantz



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.


-Original Message-From: Robin Hilliard 
[mailto:[EMAIL PROTECTED]Sent: Friday, 11 March 2005 
13:31To: flexcoders@yahoogroups.comSubject: [flexcoders] 
Left aligned form labelsHi,Does anyone else 
find the inability to left align FormItem labels a problem? We have 
a major US financial client whos style guide requires left aligned labels 
on forms. I tried to use the FormItem.labelObject property to see if 
I could get to the label's style attributes but it seems that although 
it's documented the labelObject property doesn't exist. Has anyone 
worked out a workaround? We have to build a lot of forms, would be 
good to be able to use the Flex tags.Cheers,Robinhttp://www.rocketboots.com.au

~~---
This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system. You must not disclose this e-mail to anyone without express permission from the sender. The contents of all e-mails sent to and received from Optus may be scanned, stored, or disclosed to others at Optus discretion.

Optus has exercised care to avoid errors in the information contained in this e-mail but does not warrant that the information is error or omission free. The information (including any pricing information) contained in this e-mail is subject to change. This e-mail is not a quotation or proposal and no contractual obligations arise until you and Optus sign a formal written contract or formal variation to your existing contract. 

Any pricing contained in this e-mail is exclusive of GST unless otherwise stated.





Re: [flexcoders] Left aligned form labels

2005-03-11 Thread JesterXL



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:Scriptmx:Canvas 
width="100%" height="100%"mx:Form id="my_form" 
x="109" y="83" borderColor="#00" 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:Formmx: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 
To: 'flexcoders@yahoogroups.com' 

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.


-Original Message-From: Robin Hilliard 
[mailto:[EMAIL PROTECTED]Sent: Friday, 11 March 2005 
13:31To: flexcoders@yahoogroups.comSubject: [flexcoders] 
Left aligned form labelsHi,Does anyone else 
find the inability to left align FormItem labels a problem? We have 
a major US financial client whos style guide requires left aligned labels 
on forms. I tried to use the FormItem.labelObject property to see if 
I could get to the label's style attributes but it seems that although 
it's documented the labelObject property doesn't exist. Has anyone 
worked out a workaround? We have to build a lot of forms, wouldbe 
good to be able to use the Flex tags.Cheers,Robinhttp://www.rocketboots.com.au~~---This e-mail may contain confidential information. 
If you are not the intended recipient, please notify the sender immediately 
and delete this e-mail from your system. You must not disclose this e-mail to 
anyone without express permission from the sender. The contents of all e-mails 
sent to and received from Optus may be scanned, stored, or disclosed to others 
at Optus discretion.Optus has exercised care to avoid errors in the 
information contained in this e-mail but does not warrant that the information 
is error or omission free. The information (including any pricing information) 
contained in this e-mail is subject to change. This e-mail is not a quotation 
or proposal and no contractual obligations arise until you and Optus signa 
formal written contract or formal variation to your existing contract. 
Any pricing contained in this e-mail is exclusive of GST unless 
otherwise 
stated.


Re: [flexcoders] Left aligned form labels

2005-03-11 Thread JesterXL
They probably did an Assetpropflags on it to hide it from for in loops.

- Original Message - 
From: Robin Hilliard [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, March 11, 2005 5:18 PM
Subject: Re: [flexcoders] Left aligned form labels



Nice One! Thanks Paul  Jesse. Don't know why I couldn't see label_mc 
when I was dumping out the properties of a test FormItem.

Robin
http://www.rocketboots.com.au




Yahoo! Groups Links