Right to left language support

Most of you probably speaks Latin language, so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.

does someone have a solution for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

thanks!

For future reference:
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html

Python version?

wxPython version?
OS (and version)?
What Locale do you have set?
A snippet of code that reproduces the problem? (You probably want to convert your text to \x or \u strings and not use UTF8 (or other high bit Python source) — even though it’s legal you have have problems transmitting it via email and people being able to reconstruct it). You’d probably need a picture of the problem and a description of what is wrong.

  • Kevin
···

On Thu, Sep 4, 2008 at 7:25 AM, יהודה goldnery@gmail.com wrote:

Most of you probably speaks Latin language, so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.

does someone have a solution for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

thanks!


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

יהודה wrote:

Most of you probably speaks Latin language, so you wont understand the problem.
when I try to write Hebrew in my statictext the last punctuation marks get mixed up.
does someone have a solution for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I've never used it myself so I'm not sure exactly how well it works, but wx does have support for RTL layouts. You should just need to call SetLayoutDirection on the window, (probably the parent window is enough) and if you do any custom drawing there is a SetLayoutDirection method for wx.DC as well.

···

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

thanks i will google it

···

On Fri, Sep 5, 2008 at 8:06 PM, Robin Dunn robin@alldunn.com wrote:

יהודה wrote:

Most of you probably speaks Latin language, so you wont understand the problem.

when I try to write Hebrew in my statictext the last punctuation marks get mixed up.

does someone have a solution for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I’ve never used it myself so I’m not sure exactly how well it works, but wx does have support for RTL layouts. You should just need to call SetLayoutDirection on the window, (probably the parent window is enough) and if you do any custom drawing there is a SetLayoutDirection method for wx.DC as well.

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


http://kaze.co.il
יש קצה חוט לרעיון שלך

it worked!

i hoop this could help someone in the future

text1=wx.StaticText(panel3, -1, hebrewString ", style=wx.RIGHT)
text1.SetLayoutDirection(2)

thank you!

···

On Fri, Sep 5, 2008 at 8:06 PM, Robin Dunn robin@alldunn.com wrote:

יהודה wrote:

Most of you probably speaks Latin language, so you wont understand the problem.

when I try to write Hebrew in my statictext the last punctuation marks get mixed up.

does someone have a solution for this?

this is the code :

text=wx.StaticText(panel3, -1, Hebrew_string, style=wx.ALIGN_RIGHT)

I’ve never used it myself so I’m not sure exactly how well it works, but wx does have support for RTL layouts. You should just need to call SetLayoutDirection on the window, (probably the parent window is enough) and if you do any custom drawing there is a SetLayoutDirection method for wx.DC as well.

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


http://kaze.co.il
יש קצה חוט לרעיון שלך

יהודה wrote:

it worked!

i hoop this could help someone in the future

text1=wx.StaticText(panel3, -1, hebrewString ", style=wx.RIGHT)
text1.SetLayoutDirection(2)

To avoid the magic number in that statement you can use wx.Layout_RightToLeft.

···

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