Forum > Packages and Libraries

Component with horizontal scroll buttons

(1/5) > >>

JuhaManninen:
Does anybody know of a Panel like component which can scroll its child components or pictures horizontally using buttons in its left and right edges?
Something like this Javascript component :

https://www.testkarts.com/assets/images/horizontal-card-with-arrow-2e1f1d8d6370ce94946a991d4fc0e67c.webp

It would replace the TPageControl used in component palette which has many problems. See :
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/21498
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41169

There is a related bug in TCoolbar, too.

wp:
I don't know whether some third-party package has it for Lazarus. But Delphi has a TPageScroller which seems to do what you need:
https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.ComCtrls.TPageScroller

vfclists:
I asked a such a question not too long ago and it didn't get much love - https://forum.lazarus.freepascal.org/index.php/topic,68649.0.html.

When I noticed wp's response I thought it was an answer to my question.

Perhaps it might get more attention coming from a highly esteemed member of the Lazarus establishment :) :)

JuhaManninen:

--- Quote from: wp on October 12, 2024, 12:34:14 pm ---I don't know whether some third-party package has it for Lazarus. But Delphi has a TPageScroller which seems to do what you need:
https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.ComCtrls.TPageScroller

--- End quote ---
Thanks. It is a wrapper to a Win32 Common Control.


--- Quote from: vfclists on October 12, 2024, 05:33:48 pm ---When I noticed wp's response I thought it was an answer to my question.

--- End quote ---
Yes, but only if you use Delphi on Windows.
TPageScroller should be implemented in LCL. Do other native widgetsets have such a control?
If not then it could be made from TCustomPanel and the scroll buttons could be drawn there.
Anybody?

jamie:
This worth anything ?
https://wiki.delphi-jedi.org/wiki/JVCL_Help:TJvPageScroller


 I guess I jumped to quick, it's a subclass from the Delphi unit.

 Anyways, I don't see a real problem in implementing that. The problem I see is where does the Arrows live? Are they confined to the control itself or are they living as another sub-control attached to it?

  Scrolling the view is a little tricky and the only way I know how to do that without widget issues is to offset a panel within a panel so that it hides the contents as you scroll the view. This will prevent standard scrollbars to be used.

Navigation

[0] Message Index

[#] Next page

Go to full version