Search the Community
Showing results for tags '$es_autohscroll'.
-
My code. Does not work ;~ [optional] Control styles: ;~ $ES_AUTOHSCROLL - Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. ;~ $ES_AUTOVSCROLL - Automatically scrolls text up one page when the user presses the ENTER key on the last line. Local $hEditNewText = _GUICtrlEdit_Create($hGUI, "This is a test" & @CRLF & "Another Line", 8, 500, 715, 100) Local $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_STYLE) ; get style Local $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_EXSTYLE) ; get extended style ;GUICtrlSetStyle($hEditNewText, BitXOR($iStyle, $ES_AUTOHSCROLL)) ; remove hscroll left to right (force wrap) GUICtrlSetStyle($hEditNewText, BitAND($iStyle, BitNOT($ES_AUTOHSCROLL))) https://www.autoitscript.com/wiki/Setting_Styles Also tried this ;~ https://www.autoitscript.com/forum/topic/113598-solved-scrolling-read-only-text-display-using-edit-not-input-control/ Local $hEditNewText = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 8, 500, 715, 100) Local $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_STYLE) ; get style Local $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($hEditNewText), $GWL_EXSTYLE) ; get extended style GUICtrlSetStyle($hEditNewText, BitAND($iStyle, BitNOT($ES_AUTOHSCROLL))) However, this works: Local $hEditNewText = GUICtrlCreateEdit("This is a test" & @CRLF & "Another Line", 8, 500, 715, 100, $ES_WANTRETURN + $WS_VSCROLL + $ES_AUTOVSCROLL + $ES_MULTILINE + $WS_TABSTOP) My question stands. How to change the STYLE of an EDIT control? Skysnake
- 4 replies
-
- _guictrledit_create
- guictrlsetstyle
-
(and 1 more)
Tagged with: