tag:blogger.com,1999:blog-9194803383693725531.post1668869788128231310..comments2023-10-09T13:51:18.083+03:00Comments on Sergey Kovalyov: Left aligned label in FormItemAnonymoushttp://www.blogger.com/profile/12977809674331642977noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-9194803383693725531.post-65250058734645332352007-09-24T23:20:00.000+02:002007-09-24T23:20:00.000+02:00Any luck looking into an ABOVE component? I was ju...Any luck looking into an ABOVE component? I was just trying to create one and started searching google out of frustration. If I can't find one I'll probably try to post one myself.Adam Fortunahttps://www.blogger.com/profile/13583610944722890283noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-23752766932624321972007-06-11T14:09:00.000+03:002007-06-11T14:09:00.000+03:00These comments have been invaluable to me as is th...These comments have been invaluable to me as is this whole site. I thank you for your comment.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-11469809691647617832007-04-09T17:46:00.000+02:002007-04-09T17:46:00.000+02:00Doesn't look like my last post went thru, so i'll ...Doesn't look like my last post went thru, so i'll post again.<BR/><BR/>I'd still like to be able to override the layout of the FormItems to display their labels above the input fields. Anybody got ideas / solutions?<BR/><BR/>Thanks,<BR/>BruceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-39225340302783581982007-04-08T00:10:00.000+02:002007-04-08T00:10:00.000+02:00I haven't been able to successfully change the for...I haven't been able to successfully change the formItem so that the labels are placed above the input controls. Any ideas?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-40544053137483500242007-03-28T11:47:00.000+02:002007-03-28T11:47:00.000+02:00You can find fixed and slightly improved version h...You can find fixed and slightly improved version <A HREF="http://roma-ch.blogspot.com/2007/03/formitem-with-support-for-left-aligned.html" REL="nofollow">here</A>.Roman Protsiukhttps://www.blogger.com/profile/02005592653323506909noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-1540589318114653492007-03-21T16:12:00.000+02:002007-03-21T16:12:00.000+02:00override protected function updateDisplayList(w : ...override protected function updateDisplayList(w : Number, h : Number) : void {<BR/> super.updateDisplayList(w, h);<BR/> <BR/> if (label.length > 0) {<BR/> var labelAlign : String = getStyle("labelAlign");<BR/> var itemLabel : FormItemLabel = mx_internal::itemLabel;<BR/> var left : Number = viewMetricsAndPadding.left;<BR/> <BR/> if (labelAlign == "left") {<BR/> itemLabel.move(left, itemLabel.y);<BR/> <BR/> if (required) {<BR/> var indicator : IFlexDisplayObject;<BR/> var indicatorClass : Class = getStyle("indicatorSkin");<BR/> <BR/> left += itemLabel.width;<BR/> <BR/> for (var i : Number = rawChildren.numChildren - 1; i >= 0; i--) {<BR/> var child : DisplayObject = rawChildren.getChildAt(i);<BR/> if (child is indicatorClass) {<BR/> indicator = IFlexDisplayObject(child);<BR/> break;<BR/> }<BR/> }<BR/> indicator.move(left + ((getStyle("indicatorGap") - indicator.width) / 2), indicator.y);<BR/> }<BR/> }<BR/> }<BR/>}Roman Protsiukhttps://www.blogger.com/profile/02005592653323506909noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-7674655874055590202007-03-21T13:39:00.000+02:002007-03-21T13:39:00.000+02:00Actually it's not a problem to refer FormItemLabel...Actually it's not a problem to refer FormItemLabel using mx_internal::labelObject and I will rewrite this class soon. Though referencing private indicatorObj is more challenging. I have some ideas regarding it, but they are not stable enough.Anonymoushttps://www.blogger.com/profile/12977809674331642977noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-12842216487260044782007-03-21T13:30:00.000+02:002007-03-21T13:30:00.000+02:00The bad thing is that if you put a control like Te...The bad thing is that if you put a control like TextInput in this FormItem and give it a focus then your label won't be at either rawChildren.numChildren - 1 or rawChildren.numChildren - 2 (if required == true). It'll move to rawChildren.numChildren - 2 or rawChildren.numChildren - 3 respectively because there is focusPane at numChildren - 1. I assume other controls that add some sort of halo in special cases will change this situation too.<BR/>At the moment I have no good enough ideas to get itemLabel. But I'm thinking. Any help appreciated.Roman Protsiukhttps://www.blogger.com/profile/02005592653323506909noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-72065050773276927542007-01-15T14:30:00.000+02:002007-01-15T14:30:00.000+02:00It seems that usability tends to be religion more ...It seems that usability tends to be religion more than science. :)Anonymoushttps://www.blogger.com/profile/12977809674331642977noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-20003519639672582052007-01-15T13:49:00.001+02:002007-01-15T13:49:00.001+02:00I am sorry to inform you on this issue, but some u...I am sorry to inform you on this issue, but some usability study actually had confirmed that right aligned labels have less cognitive overload on users<br /><br />http://www.uxmatters.com/MT/archives/000107.phpUnknownhttps://www.blogger.com/profile/17908874328511279427noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-38311747657197156322007-01-15T13:49:00.000+02:002007-01-15T13:49:00.000+02:00I am sorry to inform you on this issue, but some u...I am sorry to inform you on this issue, but some usability study actually had confirmed that right alighed labels have less cognitive overload on users<br /><br />http://www.uxmatters.com/MT/archives/000107.phpUnknownhttps://www.blogger.com/profile/17908874328511279427noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-55235782897430631742007-01-09T18:54:00.000+02:002007-01-09T18:54:00.000+02:00I will also investigate this issue.I will also investigate this issue.Anonymoushttps://www.blogger.com/profile/12977809674331642977noreply@blogger.comtag:blogger.com,1999:blog-9194803383693725531.post-85459556822129215852007-01-09T16:53:00.000+02:002007-01-09T16:53:00.000+02:00This looks great. I'll study it closer to get a be...This looks great. I'll study it closer to get a better feel for how I can modify it to put the labels ABOVE the contained component. Thanks.Anonymousnoreply@blogger.com