Sign in to follow this  
Followers 0
Rorka

Autoscroll broken?

6 posts in this topic

I need it to autoscroll:

This is some reconstruction code:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 222, 278, 192, 124)
$Edit1 = GUICtrlCreateEdit("", 16, 8, 185, 217, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("GO", 16, 232, 187, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            While 1
                GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & "Testing")
            WEnd
    EndSwitch
WEnd

I dunno why it dont work

Share this post


Link to post
Share on other sites



Vertical scroll happens when the control receives "{ENTER}" and you set it to $ES_READONLY so it isn't receiving that even if you ControlSend() it.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

i use

_GUICtrlEdit_AppendText ($hWnd,'Text')

that auto scrolls it... instead of using Guictrlsetdata ($ID, Guictrlread ($ID) & @CR & 'Text') WHICH DOESN'T auto scroll

Share this post


Link to post
Share on other sites

_GUICtrlEdit_LineScroll($dCtrl, 0, _GUICtrlEdit_GetLineCount($dCtrl))
Replace $dctrl and slap that into a loop or somethin.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

i use

_GUICtrlEdit_AppendText ($hWnd,'Text')

that auto scrolls it... instead of using Guictrlsetdata ($ID, Guictrlread ($ID) & @CR & 'Text') WHICH DOESN'T auto scroll

Hey, I like that one. I tried it this way:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>

$Form1 = GUICreate("Form1", 222, 278, 192, 124)
$Edit1 = GUICtrlCreateEdit("", 16, 8, 185, 217, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL))
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("GO", 16, 232, 187, 25)
GUISetState(@SW_SHOW)
$n = 1

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            For $n = $n To $n + 100
                _GUICtrlEdit_AppendText($Edit1, ", " & $n & ", Testing")
            Next
    EndSwitch
WEnd

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

ya.. after some searching on a project of my own... i came across that function in one of the topics here on the forum... can't remember off the top of my head... but i was looking for a GUIstyle that would do that.. but came across this instead :D i like it its simpler and has less code to write

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0