View previous topic :: View next topic |
Author |
Message |
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Jan 19, 2003 5:40 pm Post subject: New line in EDIT strings... |
|
|
If you use @cr() in a string and then put the string in a multi-line
edit control, it will NOT use the @cr() to make a new line.
However, you can use @chr(13)@chr(10) for a new line, and
put these in a var if ya want...
Code: |
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,300,200
DIALOG ADD,EDIT,E1,5,5,290,190,,,MULTI
DIALOG SHOW
%%cr = @chr(13)@chr(10)
%s = "This is line 1"%%cr"This is line 2"%%cr"This is line 3"
DIALOG SET, E1, %s
:EVLOOP
WAIT EVENT
goto @event()
:CLOSE
EXIT
|
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Mon Jan 20, 2003 10:34 pm Post subject: |
|
|
I always got around the problem by using a list as a filter.
Code: |
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,LIST,LIST1,24,34,180,144
DIALOG ADD,EDIT,EDIT1,57,14,180,88,EDIT1,,MULTI
DIALOG SHOW
%%string = I@cr()like@cr()beans
dialog set,list1,%%string
dialog set,edit1,@text(list1)
:evloop
wait event
exit
|
NodNarb |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jan 21, 2003 12:20 pm Post subject: |
|
|
Brandon, you way is a good way to handle large text files, but if you only have to do it a few times, Mac's way is better.
BTW. Here is something to load large texts...
Code: |
list create,1
list loadtext,1
"This way you can load a large
"textfile without having to type
"LIST ADD again and again...
info @text(1)
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|