Sign in to follow this  
Followers 0
BlueScreen

Guictrlcreateedit

5 posts in this topic

Hi all,

Check this out. How can I prevent the user to click in the Edit window? If he clicks there, the numbers will be written where the mouse is...

Thanks,

Global $InfoWindow
CreateLogGui ()

For $i=1 to 100
    SendToLog ($i)
    Sleep (200)
Next

Func CreateLogGui ()
    GUICreate("Logger",400,200,-1,-1) 
    $InfoWindow=GUICtrlCreateEdit ("", -1,-1,400,200)
    GUISetState ()
EndFunc

Func SendToLog ($Text)
    GUICtrlSetData($InfoWindow,$Text & @CRLF,1)
    GUISetState ()
EndFunc

Share this post


Link to post
Share on other sites



this should work for you

Func SendToLog ($Text)
    GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"")
    GUISetState ()
EndFunc

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

this should work for you

Func SendToLog ($Text)
    GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"")
    GUISetState ()
EndFunc
Thanks, dude! :think:

Share this post


Link to post
Share on other sites

Hmmm. Yeah, it works, but each time the function is called the top of the log is shown. This is not user-friendly, since your reading of the log is interrupted each time the function is called. Is there an other way? :think:

Thanks,

Share this post


Link to post
Share on other sites

#include <GuiEdit.au3>

Global $InfoWindow
CreateLogGui ()

For $i=1 to 100
    SendToLog ($i)
    Sleep (200)
Next

Func CreateLogGui ()
    GUICreate("Logger",400,200,-1,-1) 
    $InfoWindow=GUICtrlCreateEdit ("", -1,-1,400,200)
    GUISetState ()
EndFunc

Func SendToLog ($Text)
    GUICtrlSetData($InfoWindow,GUICtrlRead($InfoWindow) & $Text & @CRLF,"")
     _GUICtrlEditLineScroll ($InfoWindow, 0, _GUICtrlEditGetLineCount($InfoWindow))

EndFunc


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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