Sry i have replaced by ExtFormItem and here is the code for that
package FlexComponent{
import flash.display.DisplayObject;
import mx.containers.FormItem;
import mx.controls.Label;
public class ExtFormItem extends FormItem {
public var align_left:Boolean = false;
override protected function updateDisplayList(w : Number, h :
Number) : void {
super.updateDisplayList(w, h);
if(align_left) {
var index_label:int = -1;
var current_label:Label = null;
if (label.length > 0) {
for(var i:Number = 0; i < rawChildren.numChildren; i++)
{
if(rawChildren.getChildAt(i) is Label) {
index_label = i;
current_label =
Label(rawChildren.getChildAt(i));
current_label.x = 0;
break;
}
}
}
if (required && current_label) {
for(var k:Number = rawChildren.numChildren-1; k >= 0;
k--) {
if(k != index_label && rawChildren.getChildAt(k) is
DisplayObject) {
var indicator : DisplayObject =
rawChildren.getChildAt(k);
indicator.x = current_label.width +
((getStyle("indicatorGap")-indicator.width) / 2);
break;
}
}
}
}
}
}
}
On Wed, Apr 1, 2009 at 4:11 PM, Paresh M More <[email protected]> wrote:
> yeah, U have replaced by ExtFormItem and here is the code for that
> package FlexComponent{
>
> import flash.display.DisplayObject;
> import mx.containers.FormItem;
> import mx.controls.Label;
>
> public class ExtFormItem extends FormItem {
>
> public var align_left:Boolean = false;
>
> override protected function updateDisplayList(w : Number, h :
> Number) : void {
> super.updateDisplayList(w, h);
> if(align_left) {
> var index_label:int = -1;
> var current_label:Label = null;
> if (label.length > 0) {
> for(var i:Number = 0; i < rawChildren.numChildren; i++)
> {
> if(rawChildren.getChildAt(i) is Label) {
> index_label = i;
> current_label =
> Label(rawChildren.getChildAt(i));
> current_label.x = 0;
> break;
> }
> }
> }
> if (required && current_label) {
> for(var k:Number = rawChildren.numChildren-1; k >= 0;
> k--) {
> if(k != index_label && rawChildren.getChildAt(k) is
> DisplayObject) {
> var indicator : DisplayObject =
> rawChildren.getChildAt(k);
> indicator.x = current_label.width +
> ((getStyle("indicatorGap")-indicator.width) / 2);
> break;
> }
> }
> }
> }
> }
> }
> }
>
> On Wed, Apr 1, 2009 at 4:07 PM, Peter Hall <[email protected]> wrote:
>
>> Did you try replacing ExtFormItem with mx:FormItem? I think your
>> problem may lie there. If so, you should ask the person who wrote that code.
>>
>> Peter
>>
>>
>> On Wed, Apr 1, 2009 at 8:04 AM, Paresh M More <[email protected]>wrote:
>>
>>> Friends,
>>>
>>> I have a Panel, called, "Create Array" and few text box,
>>> when i try to set focus on Name text box it shows me some thing, like,
>>> which is in sreen shot,
>>>
>>> Any solution for it ?
>>>
>>> Code is
>>>
>>> <mx:Panel title="Create Array" width="100%" height="100%"
>>> layout="vertical" >
>>> <mx:Form height="100%" width="100%" >
>>> <FlexComponent:ExtFormItem align_left="true" id="name1" label="Name"
>>> required="true">
>>> <mx:TextInput id="ti_arrayName" restrict="A-Za-z0123456789"
>>> styleName="padTextInput" width="150" />
>>> </FlexComponent:ExtFormItem>
>>> </mx:Form>
>>> </mx:Panel>
>>>
>>> And is use this command, ti_arrayName.setFocus(); // which i called on a
>>> button click
>>>
>>>
>>> Code is very simple, but some times, i see, proper display but some times
>>> i see, as per screen shot.
>>>
>>> Y the hell, adobe flash player showing such behavious, I am using, Flash
>>> 10 player.
>>>
>>>
>>> Any solution i would really appricate.
>>>
>>>
>>> --
>>> Regards,
>>> Paresh M. More
>>> Software Engineer
>>>
>>> Nashik/Pune, Maharashtra, India.
>>> Email - [email protected]
>>> Messages in this topic
>>> <http://groups.yahoo.com/group/flexcoders/message/140095;_ylc=X3oDMTM5cDBxY2k3BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNDAwOTUEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMjM4NTY5NTE1BHRwY0lkAzE0MDA5NQ-->(
>>> 1) Reply (via web post)
>>> <http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJzZThiZ2o4BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNDAwOTUEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMjM4NTY5NTE1?act=reply&messageNum=140095>|
>>> Start
>>> a new topic
>>> <http://groups.yahoo.com/group/flexcoders/post;_ylc=X3oDMTJmNWdrY3VpBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzEyMzg1Njk1MTU->
>>>
>>> Messages<http://groups.yahoo.com/group/flexcoders/messages;_ylc=X3oDMTJmOGo3ajlxBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNtc2dzBHN0aW1lAzEyMzg1Njk1MTQ->
>>> --
>>> Flexcoders Mailing List
>>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>>> Alternative FAQ location:
>>> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
>>> Search Archives:
>>> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>>> [image: Yahoo!
>>> Groups]<http://groups.yahoo.com/;_ylc=X3oDMTJlY2lvMm9oBF9TAzk3NDc2NTkwBGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNnZnAEc3RpbWUDMTIzODU2OTUxNQ-->
>>> Change settings via the
>>> Web<http://groups.yahoo.com/group/flexcoders/join;_ylc=X3oDMTJnMWhqZmRoBF9TAzk3NDc2NTkwBGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNzdG5ncwRzdGltZQMxMjM4NTY5NTE1>(Yahoo!
>>> ID required)
>>> Change settings via email: Switch delivery to Daily
>>> Digest<[email protected]?subject=email+delivery:+Digest>|
>>> Switch
>>> format to
>>> Traditional<[email protected]?subject=change+delivery+format:+Traditional>
>>> Visit Your Group
>>> <http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJlaTdqNTdmBF9TAzk3NDc2NTkwBGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNocGYEc3RpbWUDMTIzODU2OTUxNQ-->|
>>> Yahoo!
>>> Groups Terms of Use <http://docs.yahoo.com/info/terms/> | Unsubscribe
>>> <[email protected]?subject=>
>>>
>>>
>>
>>
>
>
>
> --
> Regards,
> Paresh M. More
> Senior Software Engineer
>
> Mobile: +919881400641
> Nashik/Pune, Maharashtra, India.
> Email - [email protected]
>
--
Regards,
Paresh M. More
Senior Software Engineer
Mobile: +919881400641
Nashik/Pune, Maharashtra, India.
Email - [email protected]