[wxpython-users] Is there a text control that can dynamically
mask/unmask its text?
Raffaello Barella
barbarossa.platz at gmail.com
Sat Apr 5 11:37:25 PDT 2008
Faster and nicer yours then mine, Phil. Chapeau.
2008/4/5, Phil Mayes <pmayes at olivebr.com>:
>
> At 06:25 AM 4/5/2008, Andriy wrote:
>
> > I would like to use a simple text control that can switch between:
> >
> > -- Echoing the typed characters as usual,
> > -- Echoing asterisks like wx.TE_PASSWORD style in wx.TextCtrl,
> >
> > after the control has been initialized (for instance, controlled by a
> > "mask/unmask" checkbox).
> >
> > I have experimented with TextCtrl.SetWindowStyle and
> > TextCtrl.SetWindowStyleFlag, without success. As far as I can tell, I
> > cannot change the style to wx.TE_PASSWORD once the control is
> > created.. Is there a way to do this, or another control capable of
> > such behavior?
> >
>
> I would intercept wx.EVT_TEXT and if in password mode, read the value,
> extract the non-* char, save it, and replace the text with *'s.
>
> Phil
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200804=
05/4336300d/attachment.htm
More information about the wxpython-users
mailing list