[wxPython-users] Can't get a choice pull-down to initialize
without any selection on Linux
Robin Dunn
robin at alldunn.com
Mon Oct 29 13:00:47 PDT 2007
Regan Tackett wrote:
> I want to create a choice pull-down menu on a panel. The choices on the
> pull-down menu are "Yes" and "No". However, I do not want either to be selected
> when the widget is initially drawn. I want the user to have to choose either
> yes or no. The below code works great on Windows XP using the
> "SetSelection(-1)" method. However, if executed on Fedora Core 6, the initial
> selection is not left blank, it is "Yes". Does anyone know how to get this to
> work on Linux? I do not want to use a blank string in my "self.listValues"
> tuple if I can help it.
That is the best (perhaps only) way to do it. I wouldn't be surprised
if the native choice widget by definition only allows the selection to
be one of the choices in the list.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list