Jump to content

Linefeed in GUICtrlSetData


skiffle
 Share

Recommended Posts

Hallo, I try to fill an GUICtrlCreateEdit with data. The command I use is the GUICtrlSetData command, but I don´t know how to make a linefeed. The result should be something like:

test

test2

test3

If there is any help you can make me smile again. Thanks Skiffle

Link to comment
Share on other sites

Sorry, thanks for the ideas, but I use this code:

While 1

$line1 = FileReadLine($file1)

If @error = -1 Then ExitLoop

MsgBox(0, "Line read:", $line1)

$line2 = FileReadLine($file1)

GUICtrlSetData(-1, $line1 & @CRLF)

Wend

On each loop the FileReadLine read a new line but GUICtrlSetData just write in the first line. The @CRLF does not work here??

Do you have an idea for this?

Regards Skiffle

Link to comment
Share on other sites

Sorry my fault, I did not see the pur fileread function

Thanks for all

Also your first code would work if you set the 3rd parameter in GUICtrlSetData.

While 1
    $line1 = FileReadLine($file1)
    If @error = -1 Then ExitLoop
    MsgBox(0, "Line read:", $line1)
    $line2 = FileReadLine($file1)
    GUICtrlSetData(-1, $line1 & @CRLF, 1); <-- Notice this 1. It means don't erase previous contents. Instead, add on to it.
Wend
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...