Jump to content

Need help with GuiCtrlCreateEdit()


Info
 Share

Recommended Posts

Example:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 116, 163, 218, 150)
$Edit1 = GUICtrlCreateEdit("", 0, 32, 113, 129)
GUICtrlSetData(-1, "")
$Button1 = GUICtrlCreateButton("Button1", 0, 0, 113, 33, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUICtrlSetData($Edit1,guictrlread($Edit1)&"Line"&@CRLF)
    EndSwitch
WEnd

After I click Button1 many times, that thing will bet created: (marked in red)

Posted Image

Now I get it down to read the new line:

Posted Image

Then I press Button1 again and it gets back up. >_<

Is there any way to make it stay down?

Edited by Info
Link to comment
Share on other sites

Is there any way to make it stay down?

The thing in red is the scroll bar.

I suggest you search the help file, or the forum, for the words 'Scroll' and 'Edit'. You can scroll to any line in the edit control. But I'm not quite sure of the exact function name. I'm using an older version of AutoIt, and I don't want to tell you the wrong thing.

UPDATE: I think the function name you want is: _GUICtrlEdit_LineScroll

Perhaps this thread will help you.

It might also help if you show us the rest of your code!

Edited by czardas
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...