qwert Posted March 3, 2008 Share Posted March 3, 2008 Is there a setting to turn off -- or set to white -- the thin default border that is placed around an input control? The create I'm using is simply: $ctrlIn = GUICtrlCreateInput("", 20, 60, 100, 30)But for my application, the resulting control is on a white "container" background and the extra line around the input field looks out of place. I've searched and read quite a few posts and can't get a handle on how to do this. Thanks in advance for any help. Link to comment Share on other sites More sharing options...
ResNullius Posted March 3, 2008 Share Posted March 3, 2008 Is there a setting to turn off -- or set to white -- the thin default border that is placed around an input control? The create I'm using is simply: $ctrlIn = GUICtrlCreateInput("", 20, 60, 100, 30)But for my application, the resulting control is on a white "container" background and the extra line around the input field looks out of place. I've searched and read quite a few posts and can't get a handle on how to do this. Thanks in advance for any help.Like this? #include <GUIConstants.au3> $gui = GUICreate("", 300, 200) GUISetBkColor (0xFFFFFF) $Input = GUICtrlCreateInput("Borderless Input", 10,10,190, 20, -1, $WS_EX_TOOLWINDOW) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
qwert Posted March 3, 2008 Author Share Posted March 3, 2008 Exactly like that! Thanks very much.But how did you know to use the $WS_EX_TOOLWINDOW style when the definition of it says nothing about using it for individual controls?Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog box that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by typing ALT+SPACE. Link to comment Share on other sites More sharing options...
ResNullius Posted March 3, 2008 Share Posted March 3, 2008 Exactly like that! Thanks very much.But how did you know to use the $WS_EX_TOOLWINDOW style when the definition of it says nothing about using it for individual controls?Individual controls are actually "windows" themselves. You can apply many window styles/manipulations to controls themselves. Link to comment Share on other sites More sharing options...
qwert Posted March 3, 2008 Author Share Posted March 3, 2008 Individual controls are actually "windows" themselves. You can apply many window styles/manipulations to controls themselves.Wow. That's a breakthrough in understanding for me. That simple statement needs to be "up in lights" somewhere, if it's not already (and I just missed it).Thanks again. Link to comment Share on other sites More sharing options...
qwert Posted March 3, 2008 Author Share Posted March 3, 2008 A footnote for others: I've found that $WS_EX_TRANSPARENT is a better choice because it does not affect the behavior of other fields on the GUI. Link to comment Share on other sites More sharing options...
ResNullius Posted March 3, 2008 Share Posted March 3, 2008 (edited) Wow. That's a breakthrough in understanding for me. That simple statement needs to be "up in lights" somewhere, if it's not already (and I just missed it).Thanks again.Yes, it was a eureka moment for me when I first learned about it after reading some thread in the forum some/long time ago.A footnote for others:I've found that $WS_EX_TRANSPARENT is a better choice because it does not affect the behavior of other fields on the GUI.Can you clarify what you mean by "does not affect the behaviour of other fields on the GUI"?I don't see any odd behaviour with $WS_EX_TOOLwindow... not that it's better than $WS_EX_TRANSPARENT, just curious... Edited March 3, 2008 by ResNullius Link to comment Share on other sites More sharing options...
qwert Posted March 3, 2008 Author Share Posted March 3, 2008 (edited) Can you clarify what you mean by "does not affect the behaviour of other fields on the GUI"?I had several buttons defined on the same GUI. With $WS_EX_TOOLWINDOW for the input style, the button clicks were no longer detected. I just changed to $WS_EX_TRANSPARENT and everything worked again, so I didn't investigate any further. It may have been due to some other simple setting or conflict that I don't know about -- but Transparent is working fine for me. Edited March 3, 2008 by qwert 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