Help with wxPython

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mitsura@skynet.be

    #1

    Help with wxPython

    Hi,

    I have encountered an annoying problem with wx.Choice from wx.Python.
    Basically, what I want to do is create a drop down box with a set of
    choices (so far so good). The problem is that when the drop down box is
    created, the first entry in the list of the drop down box is empty and
    you need to drop down in the list to make your choice.
    I was looking for an option that allows to set a default/preset choice
    in the list.
    This is important because I have written an apps where you can set the
    properties of objects (cars) via drop down list and choose between a
    set of pre-defined choices. However, if the set the properties of the
    car (color, model, ...) via the Edit Properties windows but later you
    which to change a properties it would be nice to see the choices you
    made in de dropdown list and not a blank a first choice.

    It seems trivial do.

    Any help very much appreciated.

    Kris

  • Roel Schroeven

    #2
    Re: Help with wxPython

    mitsura@skynet. be wrote:
    [color=blue]
    > I have encountered an annoying problem with wx.Choice from wx.Python.
    > Basically, what I want to do is create a drop down box with a set of
    > choices (so far so good). The problem is that when the drop down box is
    > created, the first entry in the list of the drop down box is empty and
    > you need to drop down in the list to make your choice.
    > I was looking for an option that allows to set a default/preset choice
    > in the list.[/color]

    The SetSelection method does that. I guess the reason you didn't find it
    is because it is not included in the documentation for wxChoice itself;
    it is described in the section for wxControlWithIt ems, which is
    wxChoice's base class.

    --
    If I have been able to see further, it was only because I stood
    on the shoulders of giants. -- Isaac Newton

    Roel Schroeven

    Comment

    Working...