![]() |
wxPython Help
I've got several questions about wxPython, and I'm trying my best to solve them all myself. So, for now, I'll just start with a basic question I've been trying to figure out myself.
How do I make a flat button? The darker ones that you can not click? I have tried... :
but_cancel = wx.Button(panel, ID_CANCEL, "Cancel", style=wxNO_BORDER )wxNO_BORDER, is supposed to flatten it in Windows and GTK+. However, it still displays as a normal button. Help? |
Did you check this out: http://wiki.wxpython.org/index.cgi/GenWinFlatButton
Or just this: Google Search Dunno if that's what you are looking for. MF_GRAYED can be used in the Win32 API to gray out a button. |
No, that makes one of those old win32 buttons. The ones without a border that get a border when you hover over top. I need one that doesn't hover, click, or trigger events. A flat, readonly button.
Edit: Do you know how to get what in html is called a fieldset? The border and caption wrapped around things like "Options - quote message in reply" part of the quick post? |
Are you referring to a text box or label widget, not a button? Put inside a border, say?
|
Oh, I guess that's what I should have searched for... a label. Yes, just the same thing as
Quote:
|
You mean like a group box or a grayed out checkbox or both?
|
http://img530.imageshack.us/img530/9994/getit1fs.jpg
That is what I'm looking for, a fix to my code to make wxNO_BORDER work as intended. Nuff' said. As to the legend/fieldset/label thing, I've figured it out by sprawling through the documentation of wxwidgets: wxStaticBox() ... I'm surprised I managed to find that since its an unexpected name. |
Get Boa Constructor or something similar. This stuff is right in front of your eyes on the menu bars. What you're calling no border, if that's actually what you mean, is disabled (grayed out), a state.
http://www.daweidesigns.com/images/Stuff.gif |
Even if wxNO_BORDER doesn't grey it out, shouldn't it still at least do something? And after some poking around, I've still only found support for a disabled state on bitmap buttons, no more.
P.S. Here's what I've got so far. http://img512.imageshack.us/img512/7...eenshot2fo.png Really just the disabled buttons left... |
Wow, all I did was dir() the button and found a method called disable. Apparently all wxWidgets support this method:
:
but_cancel = wx.Button(panel, ID_CANCEL, "Cancel")I'm having other difficulties, but I won't bother asking. |
| All times are GMT -5. The time now is 7:57 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC