Creating text scrolling effect in REALbasic line

This tutorial will show you how can you create a basic text scrolling effect similar to credits available in Firefox about window. To make it easy we will use here a Time and TextArea Controls. Watch it, learn it, enjoy it!

Creating the About Window

Go to Window1 Property panel and configure this values: Width: 308, Height: 372, BackColor: true, BackColor: &cFFFFFF, Resizeable: false. Insert to the Window a Canvas Control and as Backdrop use the graphics you like. Now insert on Windows TextArea Control and configure this values: Top: 376, Width: 308, Height: 173, ScrollbarHorizontal: false, Border: false, BackColor: &cFFFFFF, Enabled: false and insert in Text 10 positions. If you like have more data there you should increase some values (Height, Top).

text scrolling effect in realbasic

Text scrolling effect

Add to Window Time Control and in Property panel change Period property value to 10. Now double click on Timer icon in Window1 (you are now in Timer Sub Action()) and copy this code.

1
2
3
4
5
TextArea1.Top = TextArea1.Top - 1 // scrolling the text up
 
if TextArea1.Top = -50 then // if text position top is -50
    TextArea1.Top = 376 // then begin scrolling text again
end

This is a very basic conception of creating this kind of text scrolling effect. If you are more advanced you can for example create a dynamic picture displayed on canvas control and scrolling it up. The effect will be similar.

Author: Jakub Pawlak

I'm interested in all. Currently working on the development of TUTSPOLIS and I hope that in near feature the project will be successful.

4 Responses to “Creating text scrolling effect in REALbasic”

  1. Sunil Abraham says:

    Can you give an example of scrolling text left side

  2. Jakub Pawlak says:

    Create a new project and insert the StaticText Control into Window1. Now in StaticText1 Left Property Value insert -96. Add to Window Time Control and in Property panel change Period property value to 10. Now double click on Timer icon in Window1 (you are now in Timer Sub Action()) and copy this code.

    StaticText1.Left = StaticText1.Left +1 // scrolling the text left

    if StaticText1.Left = 602 then // if text position left is 602
    StaticText1.Left = -96 // then begin scrolling text again
    end

  3. Sunil Abraham says:

    Thanks for the quick reply. Actually i was looking for a scrolling news ticker with smooth effect (no flicker) in windows environment with ability to change font color and add graphics. Could you help with this.

  4. Jakub Pawlak says:

    I will create in future a tutorial about creating this kind of effect. If you like do is yourself you should use Graphics.DrawString and Graphics.DrawPicture Method. To tweak flicker effect you should experiment with the Timer COntrol Period property value.

Leave a Reply

Copyrights (c) TUTSPOLIS | Powered by Wordpress MU | Inspired at Elegant Themes designed by qbap (HTML5 & CSS3)