Jump to content
Sign in to follow this  

Saving data from Edit GUI

Recommended Posts

Hello, Im trying to save text wrote in a edit control, but the problem is that it only stores 1 line of the text, when in fact I want to save all the text with multiple lines.

$ctrl_Note = GUICtrlCreateEdit("", 10, 155, 180, 50, 0x201040)

    $Memo = GUICtrlRead ($ctrl_Note)

IniWrite ($Config_File, "Miscellenious", "Memo", $Memo)
$Memo = IniRead ($Config_File,"Miscellenious","Memo", "")

        GUICtrlSetData($ctrl_Note, $Memo)

Maybe something to do with the styles, but didnt find anything in the help files.

Reading another thread, I thought it might more be a problem with ini functions. Should I use another way to store data?

Tks :)

Edited by Zed

Share this post

Link to post
Share on other sites

How about making multiple lines to a single line to fit in IniWrite() & IniRead() functions

$Memo = GUICtrlRead( $ctrl_Note )
$Memo = StringReplace( $Memo, @CRLF, " " ); " " is a unicode Chinese character which represents a space.

$Memo = IniRead( $Config_File, "Miscellenious", "Memo", "" )
$str[7] = StringReplace( $Memo, " ", @CRLF )
GUICtrlSetData( $ctrl_Note, $Memo )
Edited by ibon

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...