Gui looks different on windows xp & linux in my wxPython app

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

I sometimes get confused with wxsizers(and i'm not new to wx,python or programing at all).
  So i recomend you use a program to help you with that.
  You have Boa-Constructor(a RAD tool wich i have but don't like)
  wxGlade wich mimetizes Glade(you must know it) , i always use this, it generate the code for the gui part off your app in C++/Perl and Python , in the begining is a litle bit confuse bu when you make friends with him you'll like as much i do.
  The address is:
  http://wxglade.sourceforge.net

···

On Sun, 11 Jan 2004 08:20:45 +0100 Erling Ringen Elvsrud <erling@killozap.com> wrote:

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.

--

--

[...]

  I sometimes get confused with wxsizers(and i'm not new to wx,python or programing at all).
  So i recomend you use a program to help you with that.
  You have Boa-Constructor(a RAD tool wich i have but don't like)
  wxGlade wich mimetizes Glade(you must know it) , i always use this, it generate the code for the gui part off your app in C++/Perl and Python , in the begining is a litle bit confuse bu when you make friends with him you'll like as much i do.
  The address is:
  http://wxglade.sourceforge.net

Thanks! wxGlade is really nice, I have also tried Boa-Constructor
previously (and did not like it particulary well), I will try to redo my
gui with wxGlade and see if my problems dissapear.

Erling

···

On Sat, Jan 10, 2004 at 05:40:34PM +0000, Rodrigo wrote:

I'm new to wxPython so don't take my word for granted BUT
wxWizard might be a better choice for your app...

as for the character problem... I think it has something to do with unicode support, don't know for sure, I never used diacritics
this might help:
http://lists.wxwindows.org/archive/wxPython-users/msg08726.html

Respect,
Peter.

···

On Sun, 11 Jan 2004 08:20:45 +0100, Erling Ringen Elvsrud <erling@killozap.com> wrote:

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org