qwert Posted July 10, 2009 Share Posted July 10, 2009 I've used various "Set" steps to change the color of the font, the background, etc. -- but I've haven't found a way to set the line around an Edit Control to white. Better yet, I'd like to be able to set LineType=none. Is that possible? Thanks for any assistance. Link to comment Share on other sites More sharing options...
Authenticity Posted July 11, 2009 Share Posted July 11, 2009 (edited) Global $hGUI = GUICreate('Test', 200, 200) Global $Edit = GUICtrlCreateEdit('', 20, 20, 160, 160, -1, 0) GUISetState() Do Until GUIGetMsg() = -3 GUIDelete() ExitEdit: By the way, I think it's the WS_EX_CLIENTEDGE that needs to be removed. Edited July 11, 2009 by Authenticity Link to comment Share on other sites More sharing options...
qwert Posted July 11, 2009 Author Share Posted July 11, 2009 Edit: By the way, I think it's the WS_EX_CLIENTEDGE that needs to be removed.Thanks for the response. I do see that by using the -1 style, there are no borders. However, my control requires only a vertical scroll bar so I define the style with:GUICtrlCreateEdit("Test", 20, 20, 300, 200, $ES_AUTOVSCROLL + $WS_VSCROLL)How can I construct a "take away extended style" setting -- the setting that you mentioned was controlled by WS_EX_CLIENTEDGE? Link to comment Share on other sites More sharing options...
Authenticity Posted July 11, 2009 Share Posted July 11, 2009 The -1 is for default value of the function, the 0 in the extended style parameter makes the difference. Have a look at this code as for changing the extended style of already defined control. Only styles or extended styles that are changeable on the fly will reflect the changes, in other words, creating an edit control with it's style set to $ES_PASSWORD can't be changed on the fly latter on and vice versa: #include <Constants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global $hGUI = GUICreate('Test', 200, 200) Global $Edit = GUICtrlCreateEdit('', 20, 20, 160, 160) Global $hEdit = GUICtrlGetHandle(-1) _WinAPI_SetWindowLong($hEdit, $GWL_EXSTYLE, BitAND(_WinAPI_GetWindowLong($hEdit, $GWL_EXSTYLE), BitNOT($WS_EX_CLIENTEDGE))) GUISetState() Do Until GUIGetMsg() = -3 GUIDelete() Exit Link to comment Share on other sites More sharing options...
qwert Posted July 11, 2009 Author Share Posted July 11, 2009 ... the 0 in the extended style parameter makes the difference.Perfect. That was the part I didn't know. I get just the result I need by using:GUICtrlCreateEdit("Test", 20, 20, 300, 200, $ES_AUTOVSCROLL + $WS_VSCROLL, 0)Thanks very much for your help. Link to comment Share on other sites More sharing options...
martin Posted July 11, 2009 Share Posted July 11, 2009 Perfect. That was the part I didn't know. I get just the result I need by using:GUICtrlCreateEdit("Test", 20, 20, 300, 200, $ES_AUTOVSCROLL + $WS_VSCROLL, 0)Thanks very much for your help.BitOr($ES_AUTOVSCROLL, $WS_VSCROLL) is better and won't produce unexpected results. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
CodyBarrett Posted July 11, 2009 Share Posted July 11, 2009 BECAUSE!!! "bitor ()" and "+" do different things when combining GUistyle values i would trust Bitor() over + anyday [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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