Select to view content in your preferred language

Flex AttributeInspector field width

747
2
05-16-2012 11:20 AM
KeithGerhartz1
Frequent Contributor
Does anyone know how to increase the width of the fields displayed by the AttributeEditor using ActionScript or other method? I thought skins may be the answer but do not see any examples on how to do this. Thanks!
Tags (2)
0 Kudos
2 Replies
IvanBespalov
Frequent Contributor
---> find skin in downloaded ArcGIS API for FLEX
\arcgis_api_for_flex_3_0\ArcGIS_Flex\skins\src\com\esri\ags\skins\AttributeInspectorSkin.mxml

---> include skin in to your project (rename if needed)

---> add skinClass attribute to your ispector with reference to included skin
...
<esri:AttributeInspector id="attributeInspector" 
                                 visible="false"
                                 includeInLayout="false"
                                 skinClass="ee.alphagis.assets.skins.MyAttributeInspectorSkin"
...


---> in skin find <mx:Form> tag
<!--- 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">


---> configure form layout NB! examples you looked for
for example:
<!--- Form to display the attributes of the active feature. -->
    <mx:Form id="form"
             labelWidth="100"
...


---> other way is work (need some dev. exp.) with Fields used in attribute inspector:
DoubleField
IntegerField
StringField
...
and others in same package

you can extend them, skin them, also create own fields ...
0 Kudos
KeithGerhartz1
Frequent Contributor
Thanks very much. I will give it a try.
0 Kudos