Jump to content

GUICtrlCreateEdit help


Draygoes
 Share

Recommended Posts

Im not sure if im wording my problem correctly but here goes...

This is what it does

First line
Line 2Line 3

This is what I want it to do

First line
Line 2
Line 3

This is the code that im using

#Include <GuiList.au3>
#include <GuiConstants.au3> 
GUISetBkColor (0x00E0FFFF)
GuiCreate("test", 750, 350,(@DesktopWidth-500)/3, (@DesktopHeight-300)/3)


$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 550, 20, 200, 250, $ES_AUTOVSCROLL + $ES_READONLY + $ES_MULTILINE + $WS_VSCROLL)


GUISetState ()
sleep(2000)

GUICtrlSetData ($myedit, "Line 2",1)
sleep(1000)
GUICtrlSetData ($myedit, "Line 3",1)

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Im still a nube at gui creation

only been doing it for 3 weeks

Can anyone fix?

thx

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

This will do, you were just missing the @CRLF which is next line

#Include <GuiList.au3>
#include <GuiConstants.au3>
GUISetBkColor (0x00E0FFFF)
GuiCreate("test", 750, 350,(@DesktopWidth-500)/3, (@DesktopHeight-300)/3)


$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 550, 20, 200, 250, $ES_AUTOVSCROLL + $ES_READONLY + $ES_MULTILINE + $WS_VSCROLL)


GUISetState ()
sleep(2000)

GUICtrlSetData ($myedit, "Line 2"&@CRLF,1)
sleep(1000)
GUICtrlSetData ($myedit, "Line 3"&@CRLF,1)

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Link to comment
Share on other sites

Thx man.

btw, would you know where i can learn all about gui's

Ive tried autoit123 but its not very helpful

im sure its helpful to a lot of people but for some reason, I cant seem to learn very much from it.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
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...