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

Jürgen Hestermann juergen.hestermann at gmx.de
Tue Apr 23 18:20:56 CEST 2013


In my program (for Windows) I display log information in a TListBox.
But that has some severe drawbacks/bugs:

1.) If one of the displayed strings exceeds the right margin there is no horizontal slider to shift the text to the right so the user can see the invisible text.

2.) If the number of rows exceeds the height of the TListBox window there is a vertical slider to move up and down. But for certain widget-sets (recently applied to our workstations at work) this slider is not displayed. Instead, some remnant from previously displayed text appears in the place where the slider should be (if you guess where the slider is, it still works but it looks ugly and is awkward).

So I decided to switch to TStringGrid (with one column). This *has* a slider in case the right margin is exceeded. It is also much more flexible as I can add columns easily if needed. But now I still cannot move the (one and only) column to make text on the right visible, even though the slider is there! Is that a bug too?

I am stuck again. How can I make long (wide) text visible in a restricted window?




More information about the Lazarus mailing list