View previous topic :: View next topic |
Author |
Message |
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Tue Feb 18, 2003 10:28 pm Post subject: EDIT Dialog Element line count.... |
|
|
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 |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Feb 18, 2003 10:36 pm Post subject: |
|
|
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 _________________ 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 |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Tue Feb 18, 2003 10:38 pm Post subject: |
|
|
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 |
|
|
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Tue Feb 18, 2003 11:17 pm Post subject: |
|
|
Thanks guys! I love when there are multiple good solutions!!! |
|
Back to top |
|
|
MarkTrubo Contributor
Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Wed Feb 19, 2003 1:29 pm Post subject: |
|
|
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 |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Feb 19, 2003 1:51 pm Post subject: |
|
|
Try this:
LIST ASSIGN, 1, @dlgtext(Edit1)
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 |
|
|
|
|
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
|
|