Saturday, August 31, 2013

How to create dropdown with value and text node - WXPython

How to create dropdown with value and text node - WXPython

In HTML I can create drop-down menus like this:
<select name="">
<option value="">TextNode #1</option>
<option value="">TextNode #2</option>
<select>
Now I want something similar in wxPython. The problem is that I have not
found a solution, as it only allows me to place the text and not the
value.
Example wxPython( Create Dropdown ):
DropDownList = []
Options = {0:"None",1:"All",2:"WTF?!!"}
For Value, TextNode in Options:
DropDownList.append( TextNode )
wx.ComboBox(panel,value="Select",choices=DropDownList)
Well... How I can use a value addition to the text node?.. Thanks!

No comments:

Post a Comment