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 


EDIT Dialog Element line count....

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Feb 18, 2003 10:28 pm    Post subject: EDIT Dialog Element line count.... Reply with quote

OK, so I have an EDIT element in a dialog:

DIALOG ADD,EDIT,EDIT6,380,10,340,155,,"Choose from the pre-set cover copy"@CR()"with the drop down list and"@CR()"customize if you want to."STYLE14,MULTI,WRAP,SCROLL

but I need to limit the number of lines that are in it total -- since the use can add info to my cover sheet template text. Any quick way to know how many lines of copy are in the EDIT?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Mac
Professional Member
Professional Member


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

PostPosted: Tue Feb 18, 2003 10:36 pm    Post subject: Reply with quote

Here's the method I used in my text editor.
Change E1 to your edit box name...
Code:

rem -- Get total number of lines in document --
%n = @sendmsg(@winexists(~E1),$0BA,0,0)

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
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Tue Feb 18, 2003 10:38 pm    Post subject: Reply with quote

list create,1
list create,2
list add,1,@dlgtext(edit1)
list assign,2,1
warn @count(2)
list close,2
list close,1
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Feb 18, 2003 11:17 pm    Post subject: Reply with quote

Thanks guys! I love when there are multiple good solutions!!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Wed Feb 19, 2003 1:29 pm    Post subject: Reply with quote

Mac's solution works nice -- PGWARE's does not take into account the line wraps and counts the actual number of lines w/o breaks.

OK, now I would like to get the contents into a list like PGWARE suggested, but with the line breaks as the show in my dialog. Simple ways to do this?

Mac had a way to split stuff up to a certain with with the breaks at the right places (http://www.vdsworld.com/forum/viewtopic.php?t=931), but that was not necessarily the way to break it as shown on the dialog. Thoughts?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Mac
Professional Member
Professional Member


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

PostPosted: Wed Feb 19, 2003 1:51 pm    Post subject: Reply with quote

Try this:

LIST ASSIGN, 1, @dlgtext(Edit1)

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
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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