How to use TE_RIGHT style on a TextCtrl?

On Windows, the "testing" string is packed to the right of the text control, and the text in the text control is right-justified as well. Is that what you were expecting?

···

On Tue, 28 Sep 2004 13:58:50 -0400, Tom Bryan <tbryan@python.net>

Here's the shortest possible illustration of the problem I'm having.

import wx
app = wx.PySimpleApp()
frame=wx.Frame( None, -1, "Test" )
entry = wx.TextCtrl( frame, -1, "testing", style=wx.TE_RIGHT )
frame.Show( wx.true )
app.MainLoop()

The "testing" string is justified to the left of the text control. Am I doing something wrong, or is this known not to work? If I use style=wx.TE_PASSWORD instead, I get starts instead of characters; so I'm assuming that the code above should work.

--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.

Yes, thanks.

It sounds like it's a known limitation of the version of GTK that wxPython is
using in my environment. Oh, well. Non-critical issue for me. Maybe I'll
try with GTK2 later.

Looks like I got bit by the Law of Leaky Abstractions. :slight_smile:

---Tom

···

On Tuesday 28 September 2004 03:19 pm, Tim Roberts wrote:

>entry = wx.TextCtrl( frame, -1, "testing", style=wx.TE_RIGHT )

>The "testing" string is justified to the left of the text control. Am I
> doing something wrong, or is this known not to work?

On Windows, the "testing" string is packed to the right of the text
control, and the text in the text control is right-justified as well.
Is that what you were expecting?