1. help with Win32lib.ew SetText() into a multi line edit box...
- Posted by Michael J Raley <mjronline at IT-WORKS.COM> Jan 17, 1998
- 527 views
- Last edited Jan 18, 1998
Help! I am having a sticky problem with the setText() function in the Win32lib.ew library, and need a second opinion. When loading previously saved text, it does not appear in the multiline edit box consistently. The below procedure works in some cases, but cuts the last line of text. If there is some extra returns or space, or If I try to display all the text into the MLE (MEL1) then it is blank. global procedure load_raw() -- LOAD A RAW EDL FORM for EDIT edl=open(edlname,"r") -- name of the dialog EDL file TEST=open("e:\\euphoria\\testdis.pro", "w") -- for Debug output purposes DGedit={} -- the buffer for the Multiline edit codeline={} -- a single line of Dialog text puts(TEST, edlname&"\n") -- for debug only. Name of Dialog file while 1 do oldline=codeline codeline=gets(edl) if atom(codeline) then puts(TEST,"Atom Detected. LAST LINE=\n") -- for Debug only print(TEST, oldline) -- puts(TEST,"\n") -- print(TEST, codeline) exit --end of Dialog file end if codeline=codeline[1..length(codeline)-1]&{13,10} -- required to advance linelen=length(codeline) print(TEST, codeline) -- for Debug only puts(TEST,"\n") -- for Debug only DGedit=DGedit&codeline -- Add line to the buffer end while close(edl) print(TEST, DGedit) -- for Debug only. Check the total Dialog buffer close (TEST) editlen=length(DGedit)-(linelen) -- works sometimes DGedit=DGedit[1..editlen] setText(MEL1, DGedit[1..editlen]) end procedure -- // !NEW! Http://www.geocities.com/SiliconValley/Lab/7577 /////////// // Michael J. Raley's Modular reality Journal // ///////////////////////////////////////////////////////////////////