View previous topic :: View next topic |
Author |
Message |
Eclipse Newbie
Joined: 19 Sep 2002 Posts: 8
|
Posted: Thu Oct 24, 2002 2:53 pm Post subject: Vertical scrolling text |
|
|
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.
Bry |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Oct 24, 2002 4:00 pm Post subject: |
|
|
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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Oct 24, 2002 4:01 pm Post subject: |
|
|
Oops... That's horizontal...
Last edited by Skit3000 on Thu Oct 24, 2002 4:40 pm; edited 1 time in total |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Oct 24, 2002 4:10 pm Post subject: |
|
|
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 |
|
|
Eclipse Newbie
Joined: 19 Sep 2002 Posts: 8
|
Posted: Thu Oct 24, 2002 4:19 pm Post subject: Ok Thank You |
|
|
Thanks MAC and Skit. That is just what I was needing to know.
Thank you both to the replies.
Bry |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Oct 24, 2002 4:39 pm Post subject: |
|
|
A little add-on to Mac's code. You can use @cr() to make multiply lines work... |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Fri Oct 25, 2002 2:17 pm Post subject: |
|
|
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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Fri Oct 25, 2002 2:43 pm Post subject: |
|
|
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'... |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Oct 25, 2002 10:58 pm Post subject: |
|
|
I wouldn't think it makes much difference which
way one line of text scrolls...
Good point though nodnarb, most text does scroll up.
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
Last edited by Mac on Sun Oct 27, 2002 10:23 am; edited 1 time in total |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Oct 26, 2002 11:52 am Post subject: |
|
|
When I just started to use VDS, I took a few examples from the forum, without knowing how it works!
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 |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Oct 26, 2002 10:14 pm Post subject: |
|
|
Thanks Tommy!
Btw. Stupid first post... |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Oct 27, 2002 10:30 am Post subject: |
|
|
skit3000 wrote: | When I just started to use VDS, I took a few examples from the forum, without knowing how it works! |
Good point Skit, I've used plenty of C/C++ code without
fully understanding it...
I edited my previous reply, just wasn't thinking (as usual...).
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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Oct 27, 2002 1:59 pm Post subject: |
|
|
Btw. It is a fast made mistake. I think I could do it also, if I am to fast... |
|
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
|
|