Select to view content in your preferred language

Editor Comment Box Size??

1350
10
07-23-2013 09:51 AM
KomanDiabate
Deactivated User
Hi All,
I am working on an editing application where I collecting various data using Flex api editor. I directly using the api to design the application and I am trying to change the size of the comment box, particularly reducing the height of the comment box by half.
Does anybody knows how this is done? Is this possible?
Thanks in advance.

[ATTACH=CONFIG]26152[/ATTACH]
Tags (2)
0 Kudos
10 Replies
AnthonyGiles
Honored Contributor
Koman,

Not sure if this is a flex API question or are you using the Viewer, if so in your config file for your edit widget you have the following attribute:

<singletomultilinethreshold>

This is the maximum number of characters to display as a single line text input component, otherwise display as a multiline text area. This number is compared to the length of the string field. Number value (default is 50).

You also have the same attribute in the AttributeInspector class:

https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/components/AttributeInspector.html
Regards

Anthony
0 Kudos
KomanDiabate
Deactivated User
Hi Anthony,
I am actually using the flex api to do this. I am not worry about the width of the comment box. I am trying to change to height so that the comment box is not as tall. So I am wondering how to go about doing this? Any additional help will be appreciated.
Thanks.
0 Kudos
AnthonyGiles
Honored Contributor
Koman,

Have you looked at the AttributeInspector class?

https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/components/AttributeInspector.html#...

Regards

Anthony
0 Kudos
KomanDiabate
Deactivated User
Yes, I actually did look at it couple times, I am not seeing any thing helpful so far. Maybe I am missing something.
I tried to set the memofield to true, It gives me the desired look and field, but I not retaining the edits.
Do you know how to do this?
Thanks.
0 Kudos
YannCabon
Esri Contributor
Can you try to increase the singleToMultilineThreshold property ?
The default is 50. If you put a value bigger than you comment field length, the AttributeInspector will display a regular text input.

https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/components/AttributeInspector.html#...
0 Kudos
YannCabon
Esri Contributor
If you want to set the height for the textarea and keep multiline you can also create a FieldInspector for this field.

Like so:
<esri:FieldInspector fieldName="LONG_STRING" featureLayer="{featureLayer}">
    <esri:editor>
        <fx:Component>
            <fieldClasses:TextField height="50" />
        </fx:Component>
    </esri:editor>
</esri:FieldInspector>


The last option is to create a custom AttributeInspector skin and set the height value of the TextField.

In the default attribute inspector skin at line 69:

        <fx:Component id="textField">
            <fieldClasses:TextField height="50" minWidth="200"/>
        </fx:Component>
0 Kudos
KomanDiabate
Deactivated User
Hi Yann,
Thank you so much for your help. However I still having trouble to get this working.
Below is my fieldInspector and I am now using <fieldClases> but still getting error.
<esri:FieldInspector id="RTP_Points2" 
  featureLayer="{comments2}"
   fieldName="COMMENT"
   label="Comment">
  <fx:Component>
   <fieldClasses:TextField height="50" />
  </fx:Component>
 </esri:FieldInspector>


Error: The prefix "fieldClasses" for element "fieldClasses:TextField" is not bound - Not sure what that is.

BTW: It was a pleasure talking to you at the ESRI Conference. Hope all is well.

Merci D'avance.
0 Kudos
KomanDiabate
Deactivated User
Does anybody out there knows how to change the height of the editor comment box?
0 Kudos
DasaPaddock
Esri Regular Contributor
Error: The prefix "fieldClasses" for element "fieldClasses:TextField" is not bound - Not sure what that is.


See:
https://github.com/Esri/arcgis-samples-flex/blob/master/web/src/AttributeInspectorInfoWindowEditable...
0 Kudos