Re: Why doesn't changing window style flags work?
ioprst <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Thank! пятница, 15 ноября 2019 г., 21:23:46 UTC+3 пользователь Tim Roberts написал: > > Tim Roberts wrote: > > ioprst wrote: > >> > >> Why does setting the wx.TE_READONLY flag (wx.TE_PASSWORD) for the > >> wx.TextCtrl window not work? > > > > Are you using Windows? Some of this is a limitation of the native > > widget. On Windows, setting the ES_READONLY style is not enough to > > have it actually take effect. You need to send the control an > > EM_SETREADONLY message. The "SetEditable" method does that. Please > > try that instead. > > The same situation exists with TE_PASSWORD, which maps to the Windows > style ES_PASSWORD. There is an EM_SETPASSWORDCHAR message to request a > change in this bit, but wxWidgets doesn't expose that. You could use > SendMessage to send it directly, if you really need this, although I'm > not sure why you would, and that would be Windows-only. It might be > easier just to delete the control and recreate it. > > -- > Tim Roberts, [email protected] <javascript:> > Providenza & Boekelheide, Inc. > > > -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/f8758bbf-c746-42a3-84b2-718c5389226e%40googlegroups.com.