Recent

Author Topic: (Solved)Is there a way?  (Read 637 times)

JLWest

  • Hero Member
  • *****
  • Posts: 934
(Solved)Is there a way?
« on: May 15, 2020, 04:16:40 am »
Is it possible to turn off the Vertical Scrollbar in a listbox.

Thanks.
« Last Edit: October 23, 2020, 01:11:22 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 3912
  • My goal: build my own game engine using Lazarus
Re: Is there a way?
« Reply #1 on: May 15, 2020, 05:07:30 am »
I haven't tried but I believe it is possible but I think it won't be easy.

Alternatively you may try to use a TStringGrid and set these properties:

- ScrollBar := ssNone
- FixedCols := 0
- FixRows := 0
- ColCount := 1
- Options := [goDrawFocusSelected]

JLWest

  • Hero Member
  • *****
  • Posts: 934
Re: Is there a way?
« Reply #2 on: May 15, 2020, 05:22:17 am »
@Handoko

Hi Handoko Wow I don't know. It would be a lot of work to go from a listbox to  a TStringGrid and there is 10 or 11 of them. Maybe easier to rewrite the program.  It's a cosmetic fix more than anything, not worth the work.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

jamie

  • Hero Member
  • *****
  • Posts: 3797
Re: Is there a way?
« Reply #3 on: May 16, 2020, 12:37:15 am »
I haven't tried but I believe it is possible but I think it won't be easy.

Alternatively you may try to use a TStringGrid and set these properties:

- ScrollBar := ssNone
- FixedCols := 0
- FixRows := 0
- ColCount := 1
- Options := [goDrawFocusSelected]

He is correct on his assessment.. the StringGrid is no more harder to work with then the list box.
you load it the same way etc...
actually I use the stringgrid in many places this way to gain additional control over the code its a well behaved controlled in many aspects.. It even allows for custom drawing the cells if you wish...
its not that much of a deal converting over to it.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018