[Lazarus] How to create a listbox that can be shifted

zeljko zeljko at holobit.net
Thu Apr 25 09:40:09 CEST 2013


On 04/25/2013 09:34 AM, Sven Barth wrote:
> Am 25.04.2013 07:10, schrieb Jürgen Hestermann:
>>
>> Am 2013-04-24 20:25, schrieb Jesus Reyes:
>>>
>>>> Still I am wondering why nobody seems to miss a horizontal
>>>> shift for TListBox and TStringGrid (especially because a
>>>> slider is shown for TStringGrid but does not work). Are
>>>> these bugs which nobody discovered since years? I can't
>>>> believe it.
>>>>
>>> Do you know if is there a bug report about it?, if not, please feel
>>> free to submit one (I'm talking about the TStringGrid).
>>>
>>>
>>
>> As others told me these are all limitations of the underlying
>> widgetset (in this case Win32 GUI) so it cannot be fixed within Lazarus.
>>
> But AFAIK one can enforce a horizontal scroll bar for a list box. This
> can be seen here for example:
> http://www.delphitricks.com/source-code/components/show_a_horizontal_scrollbar_in_a_listbox.html
>
> So one might need to adjust the TListBox implementation to support this
> as well (and I simply assume for now that the other widgetsets also
> support a horizontal scrollbar in a list box...).

Afair in lazarus TListBox.ScrollWidth := Canvas.textWidth(longeststring) 
works (at least with qt widgetset).

z.





More information about the Lazarus mailing list