TextCtrl showing as Password control

I have attached a file that isn't making any sense to me.

The window has three text controls with the following styles:
wx.TE_READONLY | wx.ALIGN_CENTER
wx.ALIGN_CENTRE
wx.TE_PASSWORD

They all draw on the screen as password controls (dots instead of the numbers.)

According to the inspector widget, the style flags are 2320, 2304, and 2048.

I'm running Python 2.5.4 on win32, wxPython 2.8.9.2 (msw-unicode).
upgrading is apparently not an option for me.

Oddly enough, I have a different script that uses
wx.TextCtrl(self, style=wx.TE_READONLY | wx.ALIGN_RIGHT, name="termaward")
several times (with different names of course), and the values are
visible when I add them.

Any ideas why this is happening?

wxTEREADONLY.py (1.23 KB)

···

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

Hi,

···

On Tue, Nov 10, 2009 at 4:24 PM, Josh English <joshua.r.english@gmail.com> wrote:

I have attached a file that isn't making any sense to me.

The window has three text controls with the following styles:
wx.TE_READONLY | wx.ALIGN_CENTER
wx.ALIGN_CENTRE
wx.TE_PASSWORD

They all draw on the screen as password controls (dots instead of the numbers.)

According to the inspector widget, the style flags are 2320, 2304, and 2048.

I'm running Python 2.5.4 on win32, wxPython 2.8.9.2 (msw-unicode).
upgrading is apparently not an option for me.

Oddly enough, I have a different script that uses
wx.TextCtrl(self, style=wx.TE_READONLY | wx.ALIGN_RIGHT, name="termaward")
several times (with different names of course), and the values are
visible when I add them.

Any ideas why this is happening?

Yes, its very simple your not passing the wx.TE_PASSWORD style flag :wink:

Cody

It's a good thing you used an emoticon, Cody ...

···

On Tue, Nov 10, 2009 at 2:37 PM, Cody Precord <codyprecord@gmail.com> wrote:

Yes, its very simple your not passing the wx.TE_PASSWORD style flag :wink:

Cody

--
Josh English
Joshua.R.English@gmail.com

Hi Josh,

···

2009/11/10 Josh English <joshua.r.english@gmail.com>:

I have attached a file that isn't making any sense to me.

The window has three text controls with the following styles:
wx.TE_READONLY | wx.ALIGN_CENTER
wx.ALIGN_CENTRE
wx.TE_PASSWORD

wx.ALIGN_CENTRE is not a wx.TextCtrl style, try wx.TE_CENTRE instead.

Cheers, Frank

Arg.

That's what I get for glossing over the docs.

Thanks.

···

On Tue, Nov 10, 2009 at 2:46 PM, Frank Niessink <frank@niessink.com> wrote:

wx.ALIGN_CENTRE is not a wx.TextCtrl style, try wx.TE_CENTRE instead.

Cheers, Frank

--
Josh English
Joshua.R.English@gmail.com

Ah,

It's a good thing you used an emoticon, Cody ...

The way your original email is written it sounded like (to me anyway)
that the one you were having problems with was the second ones where
you only pass TE_READONLY | ALIGN_RIGHT to, not showing as password
controls.

Perhaps the intentions of that message are the other way around, it
would seem? <- rhetorical question mark :wink:

Cody <- obviously needs some sleep

···

On Tue, Nov 10, 2009 at 4:39 PM, Josh English <joshua.r.english@gmail.com> wrote: