TListBox and Columns lazarus / 8-Other ---------------------------------------------------------------------- MikeFinch · 2009-07-28 05:15 It's no good : there are two differences between Windows & Linux TListBox that I have noticed : A) In Linux under property Font there's "Orientation = 0"; tried 1, no difference. B) Property TopIndex insists on staying on -1; my Windows value is 0. When I run my respective programs, the ListBox in Windows displays 5 columns and has a horizontal scrollbar; under Linux the same code insists on ONE column only on the LHS with a vertical scrollbar. I'm at my wit's end trying to understand this; is Linux lazarus faullty, is it me or what? Can anyone out there help; I take it that some "chief scrutineer" checks on this Forum at least occasionally? ---------------------------------------------------------------------- theo · 2009-07-28 08:42 You are too nervous. Calm down a little, please ;-) Orientation and Columns work for me. See attachment. Lazarus 0.9.27 r20933M FPC 2.2.4 i386-linux-gtk 2 (beta) Orientation is in 1/10 degree, so "1" will not have any visible effect. Try 450. ListBox is not really ideal for having multiple columns. There is TListView or TStringGrid. ---------------------------------------------------------------------- marquessbr · 2009-07-28 11:17 tstringgrid is is good for work with columns, rerere ---------------------------------------------------------------------- MikeFinch · 2009-07-29 00:11 Thankyou theo and marquessbr : I'm quite relaxed now! I have indeed used stringgrid as a crosstable for entering croquet results; I'm quite chuffed at the result I have obtained with Lazarus (Delphi was less accommodating). I'm able to enter results topleft down to bottomright (horizontally) whilst skipping the NW-SE diagonal (players can't play each other!). But entries have to be mistake free (e.g. draws are not allowed): I need to develop a system to access individual cells to correct mistaken entries without disturbing further data enties. Of course I'm sure it can be done, but how...........? Any ideas anybody? I'll have a look at TListView, but it beggars the question : if Windows worked why the weird result that I get in Lazarus? ---------------------------------------------------------------------- MikeFinch · 2009-08-01 07:42 I have taken up theo's suggestion of trying TListView for generating columns in a window list. After hours of juggling code (you know the sort of thing), being unfamiliar with TListView, I finally managed to get what I wanted. [As a by-the-way, I think 0.9.27 seems to be trying to make it possible to bringup help pages (html/xml) : by pressing F1 : but I haven't spent much time on this; it would obviously be an advantage (as in Delphi)  and be even better if it was the default instead of having to set it up - how to do it?!] The above TListView implementation is in Windows, where TListBox worked anyway; I'm hoping the linux version works this time with similar code[?]. TWO OBSERVATIONS : I finally tried setting the property 'columns' to zero and THEN got the columns display!! Not intuitive when in TList you set columns (in my case as 5). In TListView I seemed to get multiple columns of one character - rubbish! The other observation is that hitting a letter key didn't take me to the first list entry beginning with that letter (as in TList). But after hitting 'end', which took me to the last entry, THEN hitting any letter takes me to the first entry beginning with said letter. IS THIS A BUG?? If TListView works in Linux, then I still have to solve the ComboBox corruption problem and tricky BorderIcons.