[wxPython] not wxStaticText

Hi,

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)

Thanks!
  Rob Cakebread

···

--------------------------------------
FREE ANONYMOUS EMAIL! Sign up now.
http://www.subdimension.com/freemail

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

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!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

Hi, I tried this:

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!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

--------------------------------------
FREE ANONYMOUS EMAIL! Sign up now.
http://www.subdimension.com/freemail

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

There's no way to use wxStaticText, is there? (I guess that's why
its named "static".)

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 Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

Quoting Robin Dunn <robin@alldunn.com>:

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

--------------------------------------
FREE ANONYMOUS EMAIL! Sign up now.
http://www.subdimension.com/freemail

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users