layer Posted September 20, 2005 Posted September 20, 2005 (edited) Hey guys I've got a problem, and I've got a script to reproduce it... I'm sure the solution is under my nose... But I can't see it ! So I've come to the forums...Basically, my GUI edit styles aren't updating. In the example below, if you type until the border, the text should auto scroll to the next line, like word wrap, and it does. But then, click the button "Click", and the text should stop auto scrolling, and just go past the border... But it continues to word wrap even though I added auto scrolling styles ! Here is the example...:; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Edit_1 = GuiCtrlCreateEdit("", 20, 60, 330, 200, BitOr($ES_WANTRETURN, $ES_MULTILINE, $WS_TABSTOP)) $Button_2 = GuiCtrlCreateButton("Click", 50, 20, 80, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button_2 GUICtrlSetStyle($edit_1, BitOr($ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_MULTILINE, $WS_TABSTOP)) EndSelect WEnd ExitThe answer is probably right there... OR has been asked a million times, but I just need some help this time... Cheers Edited September 20, 2005 by layer FootbaG
CyberSlug Posted September 20, 2005 Posted September 20, 2005 Not a solution, but might helphttp://www.autoitscript.com/forum/index.php?showtopic=5440 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
layer Posted September 20, 2005 Author Posted September 20, 2005 Thanks CS, I'll look into that. I'll see if there is a message or DllCall to be used... If not, I guess I could read the contents of the control, delete it, make the new control with new styles, and set the data... Kind of sloppy, but it may be the only solution. Thanks FootbaG
quaizywabbit Posted September 20, 2005 Posted September 20, 2005 (edited) Thanks CS, I'll look into that. I'll see if there is a message or DllCall to be used... If not, I guess I could read the contents of the control, delete it, make the new control with new styles, and set the data... Kind of sloppy, but it may be the only solution.Thanks Const $SWP_NOMOVE = 0x0002, $SWP_NOSIZE = 0x0001, $SWP_NOZORDER = 0x0004, $SWP_FRAMECHANGED = 0x0020;from Winuser.h DllCall("user32.dll", "long", "SetWindowPos", "hwnd", $yourhWnd, "hwnd", $yourhWnd, "int", 0, "int", 0, "int", 0, "int", 0, _ "long", BitOR($SWP_NOMOVE, $SWP_NOSIZE, $SWP_NOZORDER, $SWP_FRAMECHANGED))I use this to update the control or window after altering styles/exstyles Edited September 20, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8
layer Posted September 21, 2005 Author Posted September 21, 2005 Alrighty, I couldn't get your example to work with my script quaizywabbit... So I used the idea I had after CyberSlug had posted... And I'm satisfied Thanks for the help ! FootbaG
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