PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: paulDiagnos on January 12, 2009, 12:29:51 PM

Title: ListView multilines
Post by: paulDiagnos on January 12, 2009, 12:29:51 PM
Just wondering if this is possible.

so imagine a listview 2 columns

first column first row has just some text
second column first row has description. can this description take up a few lines?

just thought I would ask before going mad on trying to solve the problem

cheers Paul.
Title: Re: ListView multilines
Post by: TechSupport on January 12, 2009, 01:00:15 PM
There is no built-in way to do it easily with the ListView. You could use owner draw or custom draw but you would be better off writing the control from scratch or use a dedicated grid control that has the functionality.
Title: Re: ListView multilines
Post by: Elias Montoya on January 13, 2009, 02:16:25 AM
Egrid32 can do this, in case you are interested. :)
Title: Re: ListView multilines
Post by: paulDiagnos on January 13, 2009, 04:33:54 AM
Hey Elias

erm excuse my ignorance but what is Egrid32?

Paul
Title: Re: ListView multilines
Post by: tom cone jr on January 13, 2009, 08:41:17 AM
A 3rd party grid control.  Check out the 3rd party addons forum of the PowerBASIC message board, and then visit:

http://www.egrid32.com/
Title: Re: ListView multilines
Post by: Elias Montoya on January 14, 2009, 03:53:17 PM
Quote from: paulDiagnos on January 13, 2009, 04:33:54 AMerm excuse my ignorance but what is Egrid32?

Egrid32 is a 32 BIT grid control that allows programmers to do complex things with minimal code.

You can do lots of things with listviews, but for when you end, your source code could be so cluttered, that will make your source code debugging harder.

For example, in order to allow multiple lines of text in a certain column, all you would have to do is:

SendMessage(hGrid, %EG_SETCOLUMNWRAPMODE, ColumnNumber&, &TRUE)

Then just load the text separated with $CRLF for each line and you are done.

You can Even configure certain cells to display scrollbars in case there are too many text rows in the cell.

There are lots of possibilities. :)