Recent

Author Topic: Listbox scrollbar  (Read 16172 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Listbox scrollbar
« on: January 13, 2011, 05:24:54 pm »
Who tells me how do I activate the scrollbar in the listbox orizzonatel? Examples?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1930
Re: Listbox scrollbar
« Reply #1 on: January 13, 2011, 06:06:09 pm »
orizzonatel?

You mean orizzontale (italian, horizontal:english)?

It should show up automatically when the content is wider than the component.

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Listbox scrollbar
« Reply #2 on: January 14, 2011, 07:49:43 am »
is not Italian, I mistyped. Sorry

But really I do not I see the horizontal scrollbar automatically as you say.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Listbox scrollbar
« Reply #3 on: January 14, 2011, 12:44:20 pm »
Delphi doesn't do horizontal scrollbar either. Also there doesn't seem to be a property to do that either.

At least you have, in theory, option to do a big TList that fits all items vertically and horizontally, and put that in TScrollBox. Or you can use TStringGrid with 1 column. Maybe other choices aswell...

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Listbox scrollbar
« Reply #4 on: January 14, 2011, 12:50:38 pm »
Ok. Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

DirkS

  • Sr. Member
  • ****
  • Posts: 251
Re: Listbox scrollbar
« Reply #5 on: January 14, 2011, 12:54:35 pm »
Quote
Delphi doesn't do horizontal scrollbar either. Also there doesn't seem to be a property to do that either.
I found references in the Delphi docs to TListBox.ScrollWidth and .ClientWidth. If ScrollWidth > ClientWidth it will show a scrollbar. Can't find these in the Lazarus docs though.

TListView could be an option. It *does* have options to set scrollbar options directly.

Gr.
Dirk.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Listbox scrollbar
« Reply #6 on: November 01, 2011, 07:14:51 pm »
Lazarus does support a ScrollWidth property for TListBox. A horizontal scrollbar should appear if you set the listbox's ScrollWidth property to a value greater than the Width of the control.

tearsfornations

  • New Member
  • *
  • Posts: 35
  • Jesus is worth talking about.
    • Lightning Bolt Quiz - How many Lightning Bolts do you deserve?
Re: Listbox scrollbar
« Reply #7 on: June 10, 2023, 10:51:11 pm »
any update on this? I tried setting scrollWidth to the max integer size, but still there is no horizontal scrollbar. I am using it for pgn files, but I can't see the moves and there is no scroll bar.
-
Used C++Builder for the longest time, got macOS, How many Lightning Bolts do you deserve? Find out at my website: https://boltquiz.org

wp

  • Hero Member
  • *****
  • Posts: 12463
Re: Listbox scrollbar
« Reply #8 on: June 10, 2023, 11:15:13 pm »
Maybe a cocoa issue? On Windows it is working as described by HowardPC (except for the relevant width which must be ClientWidth rather than Width) - see attached project.

 

TinyPortal © 2005-2018