473,385 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

Aug 12 '05 #1
1 1257
mi*****@skynet.be wrote:
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.


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 wxControlWithItems, 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
Aug 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: omission9 | last post by:
Any advice on the following would be much appreciated. I have thrown everything I have at it and am completely stumped. I apologize for the length, I have tried to be as succint as possible. I...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
1
by: James Stroud | last post by:
Hello All, I will soon have an excuse to install a new operating system on my computer. I would like to know exactly what operating system I should have so that I can get wxPython going....
1
by: Sam the Cat | last post by:
using "from wxPython.wx import *" under python2.3 I cannot seem to find the wxGrid class -- it says its undefined -- am I missing something obvious ? I know the globalspace import is not the best,...
10
by: Mario | last post by:
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page:...
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
3
by: Suranga Sarukkali | last post by:
Hello, I'm Sam and I've been under som trouble with using wxPython that when I try to execute code containing wxPython gui programs provided with wxPython geting started sample progams it's giving...
5
by: MatthewWarren | last post by:
Hi, I'm wondering if anyone can tell me here, or point to a specific tutorial ( I have searched for 1/2hour, but can find only reference style docs or not-quite-what-im-after help) on how to build...
1
by: Eric von Horst | last post by:
Hi, I need some advice on Drag&Drop. What I want to achieve is the following: - I have a window that is divided in two : on the left hand I have a wx.TreeCtlr and on the other hand a...
3
by: azrael | last post by:
I need to implement a tree which will append a root. Any other node in the tree will be triggered when a button is pressed. I created the button, all the needed events, tree and a root. But when I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.