![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
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? |
|
|
|
|
|
#2 |
|
Professional Programmer
|
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.
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
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? Last edited by Sane; May 28th, 2006 at 4:38 PM. |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Are you referring to a text box or label widget, not a button? Put inside a border, say?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 | |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
Oh, I guess that's what I should have searched for... a label. Yes, just the same thing as
Quote:
|
|
|
|
|
|
|
#6 |
|
Professional Programmer
|
You mean like a group box or a grayed out checkbox or both?
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
![]() 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. |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
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. ![]() Really just the disabled buttons left... |
|
|
|
|
|
#10 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,784
Rep Power: 5
![]() |
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")
but_cancel.Disable()I'm having other difficulties, but I won't bother asking. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|