[Lazarus] How to enable Scrollbars in a custom drawn TListBox?

zeljko zeljko at holobit.net
Thu Apr 22 10:30:48 CEST 2010


On Thursday 22 April 2010 08:53, Graeme Geldenhuys wrote:
> Hi,
>
> The Lazarus Build dialog has a problem that I tried to solve in Mantis
> report #9791.
> The Listbox used is custom drawn (OwnerDraw enabled). I managed to
> make it so that you can resize the columns, but I don't know how to
> enable a scrollbar when the accumulated column width is more that the
> listbox.width. Any thoughts?

LCLIntf.ShowScrollBar(MyListBox.Handle, SB_HORZ, true)
but then you have to calculate scrollbar size too (pagesize etc) and use 
setScrollInfo().
But again, what about header ? it will not move with scrollbar

zeljko




More information about the Lazarus mailing list