Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-05

Scrolling text

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Daniel Erles

Hello.

I need to put in a form an horizontally scrolling text. Something like a StaticText (so I can set text style), but with the text scrolling horizontally, like a markee, just one line, one or two words. Anyone knows any control with this property, or how to do it programmatically in an easy way?

Tks !

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140523/ebde1b1c/attachment.html>

Reply by email

Vojtěch Čihák
to Daniel Erles

Hi,
?
I don't know any component. Basically you can do it with Canvas.TextOut(X, Y, string);. Use timer and OnTimer event will render the text in position x:=x-1. Better approach can be to create a "long" TBitmap with text and only copy the part of bitmap to canvas. Of course it depends on the length of text too. Solution with bitmap needs more memory but less CPU.? ?
Vojt?ch?

Reply by email

Daniel Erles
to Vojtěch Čihák

Thks Vojtech,
I'll try the Canvas.TextOut way.
I hope it doesen't blink, or so. Let's see.

2014-05-23 10:36 GMT-04:00 Vojt?ch ?ih?k :

Show quoted text 50 lines
Hi, I don't know any component. Basically you can do it with Canvas.TextOut(X, Y, string);. Use timer and OnTimer event will render the text in position x:=x-1. Better approach can be to create a "long" TBitmap with text and only copy the part of bitmap to canvas. Of course it depends on the length of text too. Solution with bitmap needs more memory but less CPU. Vojt?ch ______________________________________________________________ > Od: Daniel Erles > Komu: Lazarus mailing list > Datum: 23.05.2014 15:47 > P?edm?t: [Lazarus] Scrolling text > Hello. I need to put in a form an horizontally scrolling text. Something like a StaticText (so I can set text style), but with the text scrolling horizontally, like a markee, just one line, one or two words. Anyone knows any control with this property, or how to do it programmatically in an easy way? Tks ! Daniel ---------- -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140523/e42f05b1/attachment.html>

Reply by email

Chris Crori
to Daniel Erles: Hello. I need to put in a form an horizontally scrolling text. Something like a…

I use a stringgrid
with the right properties set, you have no lines, no header, you can set the size easily to as much as you like. the only ?trick? you have to use is that you always have to insert to the first line and not the last ;)

Regards,

Chris

Earlier message 16 lines
From: Daniel Erles Sent: Friday, May 23, 2014 4:45 PM To: Lazarus mailing list Subject: [Lazarus] Scrolling text Hello. I need to put in a form an horizontally scrolling text. Something like a StaticText (so I can set text style), but with the text scrolling horizontally, like a markee, just one line, one or two words. Anyone knows any control with this property, or how to do it programmatically in an easy way? Tks ! Daniel -------------------------------------------------------------------------------- --

Reply by email