DynamicRookie Posted May 4, 2018 Share Posted May 4, 2018 Hey there! So i have made a little program that is supposed to learn from what messages you send, then read on memory and answer depending if the question was found on memory. Everything works fine except for a little problem Chat edit input box is not vertically autoscrolling to end of it, i use GUICtrlRead then GUICtrlSetData to read and create a new message on it. But when messages go off the bounds of box, it scrolls to top instead of scrolling to end. I would like a way to fix it. My edit properties are: $G_Chat = GUICtrlCreateEdit('', 10, 30, 380, 320, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_READONLY, $ES_CENTER)) And i use this to create a new message GUICtrlSetData($G_Chat, $ChatLog & @CRLF & '[Centeno] : ' & $ConstantHour & ' - ' & $Date & @CRLF & $Answer) I just want a way to move the Edit Input scroll bar to end Any help is much appreciated Link to comment Share on other sites More sharing options...
Andreik Posted May 4, 2018 Share Posted May 4, 2018 This is a very basic example: #include <EditConstants.au3> #include <WindowsConstants.au3> HotKeySet('{ENTER}','SendMsg') $Main = GUICreate('Example') $Container = GUICtrlCreateEdit('',10,10,380,300,BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_READONLY, $ES_CENTER)) $MessageBox = GUICtrlCreateEdit('',10,320,380,70) GUISetState(@SW_SHOW,$Main) Do Sleep(10) Until GUIGetMsg() = -3 Func SendMsg() $Message = GUICtrlRead($MessageBox) If $Message Then GUICtrlSetData($Container,$Message & @CRLF,1) GUICtrlSetData($MessageBox,'') EndIf EndFunc Link to comment Share on other sites More sharing options...
mikell Posted May 4, 2018 Share Posted May 4, 2018 #include <GuiEdit.au3> _GUICtrlEdit_LineScroll($G_Chat, 0, _GUICtrlEdit_GetLineCount($G_Chat)) Aaron3569 and DynamicRookie 1 1 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