I'm trying to alter set up a text entry with differing
text atrributes. I have the object:
self.keyEntry = wx.TextCtrl(self,-1, "", size=100)
In some cases, I need to set this to a normal text
field, other times it needs to be a password or read
only field. I know that if I add:
style=wx_TEREADONLY or wx_TEPASSWORD and get what I
want. However, I want to pass the function a parm, in
which case when I want regular text, and I don't know
how to say, "style=wx_TEJUSTNORMALTEXT" (so to speak).
I tried to modify the textCtrl after creation, looking
on the page:
http://wxwidgets.org/manuals/2.5.3/wx_wxtextctrl.html#wxtextctrl
I've taken the example from the doc and tried:
self.keyEntry.SetDefaultStyle(wxTextAttr(*wxRED)) and
it doesn't turn the field red and I've tried to place
wxTE_PASSWORD into the parens, but the interpreter
yaks on me and say it's expecting a color.
I've tried SetStyle (0, 100, wxTE_PASSWORD) but I'm
told:
typeError: argument number 4: a 'wxTextAttr *' is
expected, 'int(2048)' is received
Could someone not only enlighten me, but point me to
the documentation so I can understand this better?
I suspect this is an easy one...but not for me so far.
Mike Brown
···
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com