eagle4life69 Posted December 9, 2006 Share Posted December 9, 2006 How can I change the Style of a button to look like a a square box with the word Go in it not to look raised and make it not look so much like a button. Do I really need to create a Bitmap to look like what I want. Link to comment Share on other sites More sharing options...
Valuater Posted December 9, 2006 Share Posted December 9, 2006 you can do alot with labels used as a button check out label "styles" and "extended styles" 8) Link to comment Share on other sites More sharing options...
Christian Blackburn Posted January 25, 2007 Share Posted January 25, 2007 you can do alot with labels used as a buttonHi Valuater,I would like to agree, but the most obvious problem with that is with underlined accelerators like "&OK". If you make a label that reads "&OK", pressing Alt+O won't work. Also, I haven't been able to get them to behave as a tabstop either. Cheers,Christian Christian Blackburn, A+, Network+ Link to comment Share on other sites More sharing options...
Valuater Posted January 25, 2007 Share Posted January 25, 2007 might want to take a look at these buttonshttp://www.autoitscript.com/forum/index.ph...st&p=2884288) Link to comment Share on other sites More sharing options...
Christian Blackburn Posted January 25, 2007 Share Posted January 25, 2007 Hi Valuater, Thanks for the suggestion, that's certainly a pretty option and would be more than satisfactory in most cases. However, I'm specifically writing a performance application and so in this instance it must be free of bloat. Thanks, Christian Christian Blackburn, A+, Network+ Link to comment Share on other sites More sharing options...
Christian Blackburn Posted January 25, 2007 Share Posted January 25, 2007 (edited) Hi eagle4life69, You should be able to just use $BS_FLAT and or $BS_PushBox, but for some reason that doesn't work. Can somebody shed some light on this? I think it has to do with the Windows XP manifest (is it called?). How can Eagle and I disable that? Here's some lousy code to exemplify the problem: #include <GUIConstants.au3> $Form1 = GUICreate("About", 189, 109, 303, 219) $Button1 = GUICtrlCreateButton("&OK", 56, 32, 43, 25, BitOr($BS_FLAT, $BS_PUSHBOX) ) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() If $nMsg = $button1 Then msgbox(4096, "huh?", "I should be flat and have no border!") EndIf WEnd Notice the attached screenshot, showing how Koda thinks a button with those styles should look. Thanks, Christian Edited January 25, 2007 by Christian Blackburn Christian Blackburn, A+, Network+ Link to comment Share on other sites More sharing options...
Valuater Posted January 25, 2007 Share Posted January 25, 2007 Hi Valuater, I would like to agree, but the most obvious problem with that is with underlined accelerators like "&OK". If you make a label that reads "&OK", pressing Alt+O won't work.... With the above reasoning in mind, how would these two "function" differently #include <GUIConstants.au3> $Form1 = GUICreate("About", 189, 109, 303, 219) $Button1 = GUICtrlCreateButton("&OK", 56, 32, 43, 25) ;, BitOr($BS_FLAT, $BS_PUSHBOX) ) $Button2 = GUICtrlCreateLabel("&OK", 60, 68, 43, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() If $nMsg = $button1 Then msgbox(4096, "button", "?????",3) If $nMsg = $button2 Then msgbox(4096, "Label", "????",3) If $nMsg = -3 Then Exit WEnd 8) Link to comment Share on other sites More sharing options...
Christian Blackburn Posted January 25, 2007 Share Posted January 25, 2007 Hi Valuater, Using your "naming conflict" two controls with Alt+O accelerators, you will actually make it to where Alt+O won't work with the button either. Using the code I provided (not your modification) you should be able to use Alt+O and have that flat button be a tabstop. Cheers, Christian Christian Blackburn, A+, Network+ Link to comment Share on other sites More sharing options...
Valuater Posted January 25, 2007 Share Posted January 25, 2007 Hi Valuater,I would like to agree, but the most obvious problem with that is with underlined accelerators like "&OK". If you make a label that reads "&OK", pressing Alt+O won't work. ...OK, forget code and "naming conflict"......(other planet)How would the above be true with buttons and not labels ??8) Link to comment Share on other sites More sharing options...
Valuater Posted January 25, 2007 Share Posted January 25, 2007 (edited) XP Button ; guess its not needed 8) Edited January 25, 2007 by Valuater Link to comment Share on other sites More sharing options...
LondonNDIB Posted June 20, 2007 Share Posted June 20, 2007 This is the only result for searching BS_PUSHBOX. According to Koda, BS_PUSHBOX style makes the button have no border. But when I run the resulting code, it doesn't work. I'm trying to use bitmaps as my buttons... they have rounded corner and already look like 3d buttons. How do I use them as buttons without having the rectangular heavy box around them??? Thanks. LD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now