Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Load esriUnits in ComboBox with familiar names

$
0
0
In my ArcMap extension (VB2010) I have a form with two comboboxes where the user can select two linear units to do a quick conversion. I have loaded up the available ESRI units in the enumeration esriUnits as follows:

cbo.DataSource = System.Enum.GetValues(GetType(esriUnits))

That works well but the combobox gets populated with the items "esriFeet", "esriMeters", etc which is what i expect. What Im looking for help on is to display a familiar name like "Feet", and "Meters" and keep the reference to each variable so that I can use it when making the conversion like

unit1 = selected item from cbo1
unit2 = selected item from cbo2
convert using the IUnitConverter interface.

I have it almost there except how to display familiar names and also keep the enumeration objects themselves in the combobox.

AGP

Viewing all articles
Browse latest Browse all 1374

Trending Articles