Recent

Author Topic: Scroll bars on checklistbox or Listbox?[solved]  (Read 3263 times)

jbmckim

  • Full Member
  • ***
  • Posts: 144
Scroll bars on checklistbox or Listbox?[solved]
« on: May 21, 2018, 10:22:09 pm »
I have n rows to display based on DB values.  (Don't want to link to a table, just show the data after its been processed some.)

I thought the TChecklistBox would be good since the user's going to pick one value (I found a sub that limits the property to one check).  Problem:  doesn't seem like it supports vertical (or horizontal) scroll bars.  That is,  I don't see anything in the property list.  Google doesn't return anything useful.  Then I tried the plain list box and it has the same issue.

Is there a property to turn on scrolling that's perhaps named a bit obscurely? Can a scroll bar be added to the property easily?

If no to the above, is there a property that will put up scroll bars as entries are added to it?

Thanks.

PS.  This whole thing is strange to me in that i can't think of another environment I've worked in that didn't just put up scroll bars when you asked for them.
« Last Edit: May 21, 2018, 10:51:54 pm by jbmckim »

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Scroll bars on checklistbox or Listbox?
« Reply #1 on: May 21, 2018, 10:41:02 pm »
Maybe I don't understand. But a (Check)Listbox, of course, does support scrollbars. The scrollbars are hidden if all items fit into the clientheight of the control, but when there are more items the vertical scrollbar does appear. A horizontal scrollbar appears when the width of the longest item exceeds the (non-zero) ScrollWidth.

The vertical scrollbar is replaced by a horizontal scrollbar when the Columns (count of columns) is 2 or more, and, again, when all items do not fit into the control rectangle.

jbmckim

  • Full Member
  • ***
  • Posts: 144
Re: Scroll bars on checklistbox or Listbox?
« Reply #2 on: May 21, 2018, 10:51:25 pm »
Well that's truly bizarre...

I just went back in and rebuilt the project to double check my error before making a demo.  Now it works.

Next question:  Where's the combo "pound head against wall" + "relief" emoji?

Thanks.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Scroll bars on checklistbox or Listbox?[solved]
« Reply #3 on: May 22, 2018, 09:49:17 am »
or you could just use this one  :-X
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018