Select to view content in your preferred language

Lenght of the scale bar shorter?

776
6
11-02-2012 05:12 AM
ionarawilson1
Deactivated User
Does anybody know how to change the lenght of the scale bar? I would like to make it shorter but I have no idea how! Thanks!
Tags (2)
0 Kudos
6 Replies
AnthonyGiles
Honored Contributor
Ionara,

The scale bar has a lengthMetric and a lengthUS property that you can specify:

http://resources.arcgis.com/en/help/flex-api/apiref/index.html?com/esri/ags/components/ScaleBar.html...

I have not tried it but it may provide the solution your are after

Regards

Anthony
0 Kudos
ionarawilson1
Deactivated User
I tried that and nothing happened. In which function should I use the properties?
0 Kudos
Town_ofFarragut
Emerging Contributor
If you double click on the scale bar, on the Scale and Units tab, click the drop down under "when resizing..." and change it to "adjust width". Not sure if that is what your are looking for but it may help.

Jeff
0 Kudos
ionarawilson1
Deactivated User
Hi Jeff,

I think you are talking about the map  layout in ArcGIS and I am creating a web mapping application in Flex
0 Kudos
Town_ofFarragut
Emerging Contributor
Ah, my bad. I didn't even notice what forum I was in. My apologies.
0 Kudos
IvanBespalov
Frequent Contributor
Ionara, IMHO, you must extend scale bar skin.
You can find it in downloaded ArcGIS API for flex, 'skins' folder.
Copy it and paste in skins package of your application,
define skin class for Scale Bar:
<fx:Style>
 @namespace mx "library://ns.adobe.com/flex/mx";
 @namespace esri "http://www.esri.com/2008/ags";
 @namespace s "library://ns.adobe.com/flex/spark";
  
 esri|ScaleBar
 {
  skin-class: ClassReference("your.skins.package.ScaleBarMetricSkin");
 }
</fx:Style>
0 Kudos