Lazarus

Programming => LCL => Topic started by: Zittergie on July 16, 2014, 10:52:05 pm

Title: Scroll in Label
Post by: Zittergie on July 16, 2014, 10:52:05 pm
Hi,

is it possible to scroll up and down in a label.  The label has a fixed height and wordwrap is TRUE.
See the picture.  I would like to add a possibility to scroll the lyrics up and down (or a scrollbar) when the lyrics are bigger than the label.

Greetz,
Bart

(Lazarus version 1.3 - FPC 2.6.2 - SVN 45889)
Title: Re: Scroll in Label
Post by: Blaazen on July 16, 2014, 11:00:44 pm
Hi,

you can take a look at Lazarus -> Help -> About Lazarus, tab Contributors, and search the sources.
Title: Re: Scroll in Label
Post by: taazz on July 16, 2014, 11:23:55 pm
erm make the label autosize and put it inside a scroll box
Title: Re: Scroll in Label
Post by: typo on July 17, 2014, 12:07:12 am
Or, if you don't want the user can scroll it, you could put it into a TPanel and scroll it programatically.
Title: Re: Scroll in Label
Post by: Zittergie on July 17, 2014, 10:22:36 am
Forgot to mention, the lyric should have to stay transparent.
Scrollbox works, but I don't find a way to make the box transparent. Setting the color to 'none' makes the box White.
Title: Re: Scroll in Label
Post by: RAW on July 30, 2019, 08:30:24 pm
I know this thread is old, but maybe someone else needs this in the future too ...  :)
The text isn't transparent, but the background is ...

This scrolls very nice:
// BrushStyle:= bsClear (Transparent Background)
https://forum.lazarus.freepascal.org/index.php?topic=46250.msg329044#msg329044
TinyPortal © 2005-2018