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 


List Line Counter for Edit Fields

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
cnodnarb
Valued Contributor
Valued Contributor


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

PostPosted: Sat Dec 28, 2002 12:59 am    Post subject: List Line Counter for Edit Fields Reply with quote

Some old editors I've seen used to use this, that's why I made this example BUT I can't remember which editors they where!! I might not even had post this code except I can't remember those darn editors!! Can someone point me to an editor that uses this (GUI) method please?

Code:

  DIALOG CREATE,New Dialog,-1,0,331,160
  DIALOG ADD,LIST,LIST1,0,2,82,135
  DIALOG ADD,EDIT,EDIT1,0,58,180,158,EDIT1,multi,scroll
  DIALOG SHOW

rem begin populate edit field
  %%count = 0
  repeat
%%text = %%text%%count@cr()
%%count = @succ(%%count)
until @equal(%%count,1000)

dialog set,list1,%%text
dialog set,edit1,@text(list1)
rem end populate edit field

rem list populated using non-dynamic method, repopulate dynamically
dialog clear,list1
rem get number of lines in edit field
%C = @sendmsg(@win(~EDIT1),$0BA,0,0)
%%count = 0
repeat
list add,list1,%%count
%%count = @succ(%%count)
until @equal(%%count,@pred(%C))

:timer
rem get topmost visible line in edit field
%A = @sendmsg(@win(~EDIT1),$0CE,0,0)
rem set topmost visible line in list box
%B = @sendmsg(@win(~LIST1),$0197,%A,0)

:evloop
wait event,.1
goto @event()

:close
exit


NodNarb
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code 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