Board index » delphi » problem getting ListBox to display in table format

problem getting ListBox to display in table format

Hi all,

Sorry if this seems like a really stupid question, but I'm new to
Delphi (but not Pascal).

I'm trying to display a table in a ListBox, pretty much the same
as you can do in a StringGrid except I need to be able to
select a whole line with the mouse (or up down keys).

If I use a StringGrid, I can select individual items in the horizontal
row and this looks a bit messy.

If I use a ListBox, I get a very messy looking table because different
letters take different amounts of room.

Can anyone help?? maybe with a new version of the ListBox with
the ability to set various tab points....

cheers,
Daren Ford
===================================================================
Words of wisdom.......
===================================================================
"It was widely believed that a million monkeys writing on a million
typewriters will eventually produce the works of Shakespeare.  The
internet has proven that this is not true".

 

Re:problem getting ListBox to display in table format


Quote
In article <6mrkcj$9j...@sucker.nl.uu.net>, da...@dutch.nl (Daz) writes:
>I'm trying to display a table in a ListBox, pretty much the same
>as you can do in a StringGrid except I need to be able to
>select a whole line with the mouse (or up down keys).

>If I use a StringGrid, I can select individual items in the horizontal
>row and this looks a bit messy.

>If I use a ListBox, I get a very messy looking table because different
>letters take different amounts of room.

If you set goRowSelect in StringGrid.Options it will do just that - individual
cells cannot be selected.

There are tabbed ListBoxes around on some of the web sites. You _can_ make your
own using the Owner Draw option in ListBox and drawing the text where the tabs
are, but this may be beyond your skills at this time. Delphi Developers Guide
by Pacheco & Teixeira - SAMS has a description of a Tabbed list Box..

Alan Lloyd
alangll...@aol.com

Re:problem getting ListBox to display in table format


Search for one called tabbed listbox, or something like that.

--
Sten Karsten Vartdal
stenvart-remo...@online.no
Maintainer of Delphi Help Page

http://home.sol.no/~stenvart/delphi.html

Other Threads