Best way to handle non-english radio boxes

Hi.

I want to make a radio box, but the options are in a different charset
(iso8859-11: Thai), and I am having trouble displaying them. With static
text, I made a wrapper class, wxThaiText, which wraps wxStaticText, but
sets the font faceName and encoding. However, wxRadioBox wants a list of
strings; and so I cannot set the charset or font to use.

My workaround is to make a not-labeled wxRadioButton ajacent to a
wxThaiText object; but then I lose the ability to click on the text to
select the option -- not to mention that event handling without
wxRadioBox is no fun at all.

This seems like a common problem. Any pointers as to what I should do?

Thanks much. Using wxPython 2.4.0.7 with wxGTK-2.4, python 2.2.2.

···

--
Jason Smith
Open Enterprise Systems
Bangkok, Thailand
http://www.oes.co.th

Hi,

I am developing an application on Linux which has to run on windows.
Unfortunatily some widgets appear on different locations. The Linux
version is 2.4.0.8 and the windows version is 2.4.1.2. Personally I would
suspect the bug in the Linux version. To set the left side of a wxSlider
on the right side of a wxSpinCtrl with LayoutConstraints I have to use

lc.left.SameAs(self.xDiv,wxRight,100)

instead of

lc.left.SameAs(self.xDiv,wxRight,0)

Did I make a stupid mistake or is there a real bug.

Torsten

Is there a specific reason why you use LayoutConstraints instead of sizers ?
I wrote a some apps on linux to be run on windows and there are only two
things not compatible I encountered so far.
The one is that you have to initialize comboboxes with some items in order to
get the dropdown displayed correctly on windows (the linux port will just
expand the dropdown to the actual number of choices, while the windows port
will leave it at the one item, no matter how many choices you add later on).
The other is that the CheckListBox can't handle ClientData on windows.

My Apps all use sizers and - save some pixels difference - the display is
pretty much identical on both platforms. Did you try one version back on
windows ? From what I read on this list the latest seems to have a few
issues, maybe this is one of them (no offense Robin. You did a great job).
usually to use one version behind the latest (i.e. if the latest is 1.3 I use
1.2). You might have to use the latest for specific features though.

I'd recommend to use sizers for the positioning. AFAIK Constraints are a
"depreciated" anyways. If you have a couple of bucks to spare you might want
to check out www.roebling.de for wxDesigner. It will create code for using
sizers (in C++, perl or python, as well as XML ressources). wxDesigner has
it's issues, but for assisting in the creation of a dialog it's a nice tool
and well worth the few bucks it takes off your budget. I figured that using
XML resources is the way to go, but build your own opinion.

···

From my 20 years of open source experience I can tell that the best bet is

On Wednesday 02 July 2003 01:42 am, Torsten Sadowski wrote:

Hi,

I am developing an application on Linux which has to run on windows.
Unfortunatily some widgets appear on different locations. The Linux
version is 2.4.0.8 and the windows version is 2.4.1.2. Personally I would
suspect the bug in the Linux version. To set the left side of a wxSlider
on the right side of a wxSpinCtrl with LayoutConstraints I have to use

lc.left.SameAs(self.xDiv,wxRight,100)

instead of

lc.left.SameAs(self.xDiv,wxRight,0)

Did I make a stupid mistake or is there a real bug.

Torsten

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

--
  UC

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

You could also take a look at wxGlade (http://wxglade.sf.net/) that is also
able to build sizer-based dialogs and windows. This is a wonderful tool
that I use for developing a largish cross-platform (ATM Linux and Windows)
application. WxGlade can generate Python code, C++ code or XRC resources.
Yay!

···

On Wed, Jul 02, 2003 at 02:15:29AM -0700, Uwe C. Schroeder wrote:

I'd recommend to use sizers for the positioning. AFAIK Constraints are a
"depreciated" anyways. If you have a couple of bucks to spare you might want
to check out www.roebling.de for wxDesigner. It will create code for using
sizers (in C++, perl or python, as well as XML ressources). wxDesigner has
it's issues, but for assisting in the creation of a dialog it's a nice tool
and well worth the few bucks it takes off your budget. I figured that using
XML resources is the way to go, but build your own opinion.

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/

Jason H. Smith wrote:

Hi.

I want to make a radio box, but the options are in a different charset (iso8859-11: Thai), and I am having trouble displaying them. With static text, I made a wrapper class, wxThaiText, which wraps wxStaticText, but sets the font faceName and encoding. However, wxRadioBox wants a list of strings; and so I cannot set the charset or font to use.

Are all the strings going to be using the same encoding? If so did you try setting the font on the wxRadioBox the same way you did with the static text? If that doesn't work, or you need different encodings for different radio buttons in the box then you should be able to make individual wxRadioButtons and set the font on each of them.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Torsten Sadowski wrote:

Hi,

I am developing an application on Linux which has to run on windows.
Unfortunatily some widgets appear on different locations. The Linux
version is 2.4.0.8 and the windows version is 2.4.1.2. Personally I would
suspect the bug in the Linux version. To set the left side of a wxSlider
on the right side of a wxSpinCtrl with LayoutConstraints I have to use

lc.left.SameAs(self.xDiv,wxRight,100)

instead of

lc.left.SameAs(self.xDiv,wxRight,0)

Did I make a stupid mistake or is there a real bug.

I can't answer that without a whole standalone sample program to test, but as others have said sizers would probably make this easier for you.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!