Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBC] Scrolling Text Box Function

Author
Message
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Jun 2007 18:27
This function allows you to place a scrolling text box of any size at any position on the screen.

Passing the text you want to print to the function will print the text inside the box at the first free line and when the box is full, automatically scroll the text up to make room.

You can also specify if you want a border around the box and the box background colour.

The function works regardless of the font face or font size currently in use.

The function:



Usage Notes:

XPos,YPos - Screen position of top left corner of text box
ScrollBoxWidth,ScrollBoxHeight - Width and Height of box
NewLine$ - Text to print
R,G,B - Background colour of text box
Border - 0 for no border and 1 for a border around text box

Important!

You MUST include the two following DIM statements at the top of your program:

Dim Display$(100): Rem Array required for function
Dim LineCount(0): Rem Array required for function


Example Usage Demo Program:



TDK_Man

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jun 2007 14:58
Nice one

Login to post a reply

Server time is: 2024-11-22 18:27:49
Your offset time is: 2024-11-22 18:27:49