Jump to content

Recommended Posts

Posted

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

Posted

Welcome to the forums.

You need a carriage return/linefeed combo, which is represented by the macro @CRLF.

GUICtrlSetData($Edit1, "test" & @CRLF & "test2" & @CRLF & @CRLF & "test3")

A complete list of macros is listed in the helpfile, or here.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Posted

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

Posted

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

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
×
×
  • Create New...