Hello,
Im a beginner with wxPython (and gui programming in general). To learn
wxPython and play with xml I have developed a small quiz app. The user
is first prompted with a menu where she can choose to start a test or
exit the program, if start test is chosen a new frame is displayed with
a question + checkboxes for the variuos answers + a picture.
The problem is:
- On windows XP when the user clicks the next question button the gui
gets totally messed up. This works fine in linux.
Do I have to take any special precautions with sizers to make sure the
gui works well on both platforms? I have used wxBoxSizers.
if you bother to look at the code: is this a nice way to represent this
step by step process? I use wxFrames for the main menu, the questions
and the summary where the result of the test is presented. Any
alternative/better suggestions is appreciated!
I have a different problem too wich is related the question texts wich
are stored in a text file. The label on the checkboxes are answers from
the textfile if I try to include the Norwegian letters ÆØÅ in the answer
text I get the following error when I try to create checkboxes:
···
----------------------------------------
File "./trafikk.py", line 273, in OnTest
self.testGui.Show(true)
File "./trafikk.py", line 55, in Show
wxNO_BORDER))
File "/usr/local/lib/python2.3/site-packages/wxPython/controls.py", line 213, in __init__
self.this = apply(controlsc.new_wxCheckBox,_args,_kwargs)
TypeError: Unable to convert string
----------------------------------------
If I just hardcode the label on the checkboxes like this:
wxCheckBox(self, 1,"ÅÅÅÆÆÆØØØØØ", wxPoint(65, 40), wxSize(500, 30), wxNO_BORDER))
How come? is this due to a problem with different character encodings or
something?
The code for the gui is available here: http://www.killozap.com/hmm/trafikk_py
tarball with pictures and all code: http://www.killozap.com/hmm/trafikkTester.tar.gz
Thanks in advance!
Erling