Select to view content in your preferred language

AttributeInspector from mx:Form to s:Form (Please ESRI)

1033
3
Jump to solution
03-16-2012 03:16 AM
LucaSimone
Deactivated User
Please ESRI, change the mx:Form inside the AttributeInspector to a new s:Form, it's needed to skin the component and use a spark.skins.spark.StackedFormSkin.
It's hard now to style the attributeInspector and I didn't find a way to move the label to the top of the input.

It's possibile in 2.6 release? (and ASAP?)
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IvanBespalov
Frequent Contributor
Luca,

2.6 will never be released (wiping a tear) - the next is version 3.0

:mad: and it is still mx:Form (Starting with Flex 4.5, Adobe recommends that you use the spark.components.Form class as an alternative to this class) - the last release Flex SDK is 4.6.0 - ESRI is two steps behind

I didn't find a way to move the label to the top of the input

NB! That is not best coding sample. I just want to show you, what you no need to worry ESRI dev. team :cool: each time you think what "It's hard ..."

in AttributeInspector skin class add red colored code:

<!--- Form to display the attributes of the active feature. --> <mx:Form id="form"               width="100%" height="100%"               enabled.disabled="false"               horizontalScrollPolicy="off"               maxHeight="{hostComponent.getStyle('formMaxHeight')}"               verticalScrollPolicy="auto"                childAdd="form_childAddHandler(event)"> </mx:Form>  // in script tag  protected function form_childAddHandler(event:ChildExistenceChangedEvent):void {     var displayObject:DisplayObject = event.relatedObject;     if (displayObject != null && displayObject is mx.containers.FormItem)     {         var formItem:FormItem = displayObject as FormItem;  var labelValue:String = formItem.label;  formItem.label = "";       var lbl:Label = new Label();  lbl.text = labelValue;  formItem.addChildAt(lbl, 0);     } }


P.S. Also you can skin mx components and containers http://help.adobe.com/en_US/flex/using/WS6DB252F3-BC93-4c6e-B95D-724CF2E928D7.html#WSF73B153C-F7B2-4...

P.S.2 You have an idea, http://ideas.arcgis.com/.

View solution in original post

0 Kudos
3 Replies
IvanBespalov
Frequent Contributor
Luca,

2.6 will never be released (wiping a tear) - the next is version 3.0

:mad: and it is still mx:Form (Starting with Flex 4.5, Adobe recommends that you use the spark.components.Form class as an alternative to this class) - the last release Flex SDK is 4.6.0 - ESRI is two steps behind

I didn't find a way to move the label to the top of the input

NB! That is not best coding sample. I just want to show you, what you no need to worry ESRI dev. team :cool: each time you think what "It's hard ..."

in AttributeInspector skin class add red colored code:

<!--- Form to display the attributes of the active feature. --> <mx:Form id="form"               width="100%" height="100%"               enabled.disabled="false"               horizontalScrollPolicy="off"               maxHeight="{hostComponent.getStyle('formMaxHeight')}"               verticalScrollPolicy="auto"                childAdd="form_childAddHandler(event)"> </mx:Form>  // in script tag  protected function form_childAddHandler(event:ChildExistenceChangedEvent):void {     var displayObject:DisplayObject = event.relatedObject;     if (displayObject != null && displayObject is mx.containers.FormItem)     {         var formItem:FormItem = displayObject as FormItem;  var labelValue:String = formItem.label;  formItem.label = "";       var lbl:Label = new Label();  lbl.text = labelValue;  formItem.addChildAt(lbl, 0);     } }


P.S. Also you can skin mx components and containers http://help.adobe.com/en_US/flex/using/WS6DB252F3-BC93-4c6e-B95D-724CF2E928D7.html#WSF73B153C-F7B2-4...

P.S.2 You have an idea, http://ideas.arcgis.com/.
0 Kudos
LucaSimone
Deactivated User
Thx Ivan,

this is a great workaround.

I know that is possible to skin a MX component, but it is a pain in the a** when, simply editing the form inside the AttributeInspector will resolve the problem.

Another question, what about a DataGrid for editing the feature's attributes? With two columns, left attribute's name and right the Field (string, blob, int, ...)?
0 Kudos
IvanBespalov
Frequent Contributor
Another question in another thread (with other name - so all members can read/help you).

As a start point do search in this forum, use keywords "datagrid". - http://forums.arcgis.com/search.php
I think, what this question is not new.
0 Kudos