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 


Vertical scrolling text

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


Joined: 19 Sep 2002
Posts: 8

PostPosted: Thu Oct 24, 2002 2:53 pm    Post subject: Vertical scrolling text Reply with quote

I am trying to figure out how to get a window/control to scroll text vertically like you see for some credits in other programs. Any help is welcome.

Confused Bry
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Thu Oct 24, 2002 4:00 pm    Post subject: Reply with quote

You mean just like in Winamp...

Code:
  DIALOG CREATE,Scroll a text,-1,0,240,160
  DIALOG ADD,EDIT,EDIT1,45,20,180,20,This text scrolls...
  DIALOG SHOW

:evloop
wait event,1
goto @event()

:Timer
dialog set,edit1,@strdel(@dlgtext(edit1),1,1)@substr(@dlgtext(edit1),1,1)
goto evloop

:Close
exit
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Thu Oct 24, 2002 4:01 pm    Post subject: Reply with quote

Oops... That's horizontal... Embarassed

Last edited by Skit3000 on Thu Oct 24, 2002 4:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Thu Oct 24, 2002 4:10 pm    Post subject: Reply with quote

You could use a TIMER loop here if you prefer...
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test Program,-1,0,300,200,
  DIALOG ADD,STYLE,S1,,16,B
  DIALOG ADD,TEXT,T1,0,80,,,"Scrolling Text",,S1
DIALOG SHOW

:EVLOOP
  %x = 0
  REPEAT
    WAIT ".05"
    DIALOG SETPOS,T1,%x
    if @greater(200, %x)
       %x = @succ(%x)
    else
       %x = 0
    end
    %e = @event()
  UNTIL %e
  goto %e

: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
View user's profile Send private message Send e-mail
Eclipse
Newbie


Joined: 19 Sep 2002
Posts: 8

PostPosted: Thu Oct 24, 2002 4:19 pm    Post subject: Ok Thank You Reply with quote

Thanks MAC and Skit. That is just what I was needing to know.
Thank you both to the replies.

Bry Very Happy
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Thu Oct 24, 2002 4:39 pm    Post subject: Reply with quote

A little add-on to Mac's code. You can use @cr() to make multiply lines work...
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Fri Oct 25, 2002 2:17 pm    Post subject: Reply with quote

OK OK, so maybe I'm picky (in fact I am very much so) but don't most scrollers go the other way? I take no credit for the code below.

Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test Program,-1,0,300,200,
  DIALOG ADD,STYLE,S1,,16,B
  DIALOG ADD,TEXT,T1,200,80,,,"Scrolling Text",,S1
DIALOG SHOW

:EVLOOP
  %x = 200
  REPEAT
    WAIT ".05"
    DIALOG SETPOS,T1,%x
    if @greater(%x, 0)
       %x = @pred(%x)
    else
       %x = 200
    end
    %e = @event()
  UNTIL %e
  goto %e

:CLOSE
  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: Fri Oct 25, 2002 2:43 pm    Post subject: Reply with quote

Who cares about which way a scroller must scroll?
The only thing I know about it, is that it is much handier if something scrolls to the top, because most people think that is easier to read! And in movies you can see 'the (wo)man that's the best'... Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Fri Oct 25, 2002 10:58 pm    Post subject: Reply with quote

I wouldn't think it makes much difference which
way one line of text scrolls...

Good point though nodnarb, most text does scroll up. Wink

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


Last edited by Mac on Sun Oct 27, 2002 10:23 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


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

PostPosted: Sat Oct 26, 2002 11:52 am    Post subject: Reply with quote

When I just started to use VDS, I took a few examples from the forum, without knowing how it works! Smile

But now I can almost 'predict' how a code would look like, before I even take a look at it...


Btw. I want to look to my first posted message, to see how I started, but if I use the search tool, I've only posted around 130 messages, but I've posted a lot more. Can this be expanded so I can search furter 'back in time'?
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sat Oct 26, 2002 10:08 pm    Post subject: Reply with quote

Skit,

Here you can see all of your posted messages:

http://www.vdsworld.com/forum/search.php?search_author=skit3000
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


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

PostPosted: Sat Oct 26, 2002 10:14 pm    Post subject: Reply with quote

Thanks Tommy!

Btw. Stupid first post... Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Sun Oct 27, 2002 10:30 am    Post subject: Reply with quote

skit3000 wrote:
When I just started to use VDS, I took a few examples from the forum, without knowing how it works! Smile


Good point Skit, I've used plenty of C/C++ code without
fully understanding it... Wink

I edited my previous reply, just wasn't thinking (as usual...). Embarassed

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
Skit3000
Admin Team


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

PostPosted: Sun Oct 27, 2002 1:59 pm    Post subject: Reply with quote

Smile

Btw. It is a fast made mistake. I think I could do it also, if I am to fast... Wink
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 -> 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