Recent

Author Topic: Scroll in Label  (Read 3896 times)

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
Scroll in Label
« 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)
Be the difference that makes a difference

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Scroll in Label
« Reply #1 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.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Scroll in Label
« Reply #2 on: July 16, 2014, 11:23:55 pm »
erm make the label autosize and put it inside a scroll box
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Scroll in Label
« Reply #3 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.

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
Re: Scroll in Label
« Reply #4 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.
Be the difference that makes a difference

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: Scroll in Label
« Reply #5 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
« Last Edit: August 28, 2019, 03:24:39 am by RAW »
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

 

TinyPortal © 2005-2018