i tried to run Boa Constructor, a wxPython program, and for some
reason its windows and controls are all right-to-left, and the texts
inside are translated into spanish.
Since Boa Constructor didn't update for half a decade, It's probably a
new behavior of wxPython. Is it?
My Windows XP has an English interface, and all other windows in the
system are left to right, "as it should be" because RTL windows are
(from my point of view) plain wrong, for several reasons.
The locale is (probably) defined to be hebrew, and I didn't set
anything to spanish, for sure.
Where should I check?
How to disable the RTL windows?
i tried to run Boa Constructor, a wxPython program, and for some
reason its windows and controls are all right-to-left, and the texts
inside are translated into spanish.
Since Boa Constructor didn't update for half a decade, It's probably a
new behavior of wxPython. Is it?
My Windows XP has an English interface, and all other windows in the
system are left to right, "as it should be" because RTL windows are
(from my point of view) plain wrong, for several reasons.
The locale is (probably) defined to be hebrew, and I didn't set
anything to spanish, for sure.
Where should I check?
How to disable the RTL windows?
Yes, IIRC wx will set the layout direction based on the defaults for the locale. I see that there is a GetLayoutDirection for the wx.App class, but no SetLayoutDirection there. The wx.Window and wx.DC classes do have a SetLayoutDirection however so one way to override it would be to call SetLayoutDireciton for the top-level frames. It will probably also work to change the locale when the application first starts up, before the frames are created, something like:
self.locale = wx.Locale(wx.LANGUAGE_ENGLISH_US)
You need to hold the reference to the locale otherwise it will revert back to the previous locale when it goes out of scope.
i tried to run Boa Constructor, a wxPython program, and for some
reason its windows and controls are all right-to-left, and the texts
inside are translated into spanish.
Since Boa Constructor didn't update for half a decade, It's probably a
new behavior of wxPython. Is it?
My Windows XP has an English interface, and all other windows in the
system are left to right, "as it should be" because RTL windows are
(from my point of view) plain wrong, for several reasons.
The locale is (probably) defined to be hebrew, and I didn't set
anything to spanish, for sure.
Where should I check?
How to disable the RTL windows?
i didn't know it's even POSSIBLE.
the actual font inside the text widget is mirrored at the letter
level! ftw.
That is very weird, probably at least partially due to StyledTextCtrl not paying any attention at all to the layout direction settings...
other wxpython programs on my computer works fine (so far...)
Hmmm... So probably something that Boa is doing is triggering this. BTW, there is probably a newer version of Boa code in their CVS repository. A snapshot of Boa's code from there is almost always in a runnable and usable state.
> i didn't know it's even POSSIBLE.
> the actual font inside the text widget is mirrored at the letter
> level! ftw.
That is very weird, probably at least partially due to StyledTextCtrl
not paying any attention at all to the layout direction settings...
> other wxpython programs on my computer works fine (so far...)
Hmmm... So probably something that Boa is doing is triggering this.
BTW, there is probably a newer version of Boa code in their CVS
repository. A snapshot of Boa's code from there is almost always in a
runnable and usable state.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org
i can recreate it for you, but i'm not sure it will do on non-hebrew
windows.
you can try, though:
grab Boa constructor from cvs, edit preferences, set the locale to be
hebrew instead of default, and run.
for sure this is the weirdest bug i've ever seen.
···
On Oct 18, 2:29 am, C M <cmpyt...@gmail.com> wrote:
On Mon, Oct 17, 2011 at 6:51 PM, shuki <asafgreenb...@gmail.com> wrote:
> thanks.
> i worked around the bug.
That was a nice bug while it lasted. I rather enjoyed the absurdity
of it. Good find.