I want a wxTextCtrl to look like wxStaticText. I'd like
the grey background, and not have users be able to change
it. I've found wxTE_READONLY, but I need to get rid of the
white/sunken border. (For both Linux & Windows, by the way)
I want a wxTextCtrl to look like wxStaticText. I'd like
the grey background, and not have users be able to change
it. I've found wxTE_READONLY, but I need to get rid of the
white/sunken border. (For both Linux & Windows, by the way)
Try calling text.Enable(false).
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
header = wxTextCtrl(self, 70, "Text I want to change", wxPoint(col,
row+210), wxSize(width, 20), wxTE_READONLY)
header.Enable(false)
It kept the sunken white background, but made the text grey.
There's no way to use wxStaticText, is there? (I guess that's why
its named "static".)
Thanks,
Rob Cakebread
Quoting Robin Dunn <robin@alldunn.com>:
···
>
> I want a wxTextCtrl to look like wxStaticText. I'd like
> the grey background, and not have users be able to change
> it. I've found wxTE_READONLY, but I need to get rid of the
> white/sunken border. (For both Linux & Windows, by the way)
>
Try calling text.Enable(false).
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
Thanks Robin, that was it. I tried SetValue when I first
tried that route.
Rob
···
You never said but I am guessing you are wanting to change the text
programatically? If so then you can use the SetLabel method of the
wxStaticText.
Robin