Select to view content in your preferred language

Python - Drop Down Box

553
3
08-02-2010 11:56 AM
RandellMcGlynn
Emerging Contributor
Hi, I'm using arcgis 9.3.1 and I would like to add a drop down box into an ArcMap .mxd file with a list of values in it. Is this possible with Python scripting?

Thank you.
0 Kudos
3 Replies
LoganPugh
Frequent Contributor
No, in 9.x Python has no ability to customize the user interface. There may be some aspects of UI customization for Python in 10.

For 9.x, you can either use VBA, which has an IDE built into the ArcGIS Desktop applications and can utilize ArcObjects along with built-in UI controls, or a 3rd party IDE and compiled programming language such as Visual Studio 2008 and C# or VB.NET. VBA is not supported (but may work) in 10, but not future versions, so if you want a long term solution a compiled DLL is probably your best bet.

See this page on the Resource Center for the options for developing for 9.3: http://resources.esri.com/arcgisDesktop/index.cfm?fa=forDevelopers
0 Kudos
ChrisSnyder
Honored Contributor
You can build a drop down box (aka picklist) via the Toolbox GUI quite easily: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Understanding_script_tool_parameters/0...

Although I have never done it, you can also build elaborate Python GUIs via:
wxPython:  http://www.wxpython.org/
TkInter: http://wiki.python.org/moin/TkInter
0 Kudos
RandellMcGlynn
Emerging Contributor
No, in 9.x Python has no ability to customize the user interface. There may be some aspects of UI customization for Python in 10.

For 9.x, you can either use VBA, which has an IDE built into the ArcGIS Desktop applications and can utilize ArcObjects along with built-in UI controls, or a 3rd party IDE and compiled programming language such as Visual Studio 2008 and C# or VB.NET. VBA is not supported (but may work) in 10, but not future versions, so if you want a long term solution a compiled DLL is probably your best bet.

See this page on the Resource Center for the options for developing for 9.3: http://resources.esri.com/arcgisDesktop/index.cfm?fa=forDevelopers


Well the plan is to wait for 10.1 and then move up. So I would like to utilize your long term solution with a dll. I'm kind of new to programming with ArcGIS, so how would I get a dll that would put a drop down box on my UI?
0 Kudos