forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


New line in EDIT strings...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Jan 19, 2003 5:40 pm    Post subject: New line in EDIT strings... Reply with quote

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... Wink
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 Smile

_________________
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
View user's profile Send private message Send e-mail
cnodnarb
Valued Contributor
Valued Contributor


Joined: 11 Sep 2002
Posts: 641
Location: Evansville, IN

PostPosted: Mon Jan 20, 2003 10:34 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Jan 21, 2003 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base All times are GMT
Page 1 of 1

 
Jump to:  
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




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group