ListView multilines

Started by paulDiagnos, January 12, 2009, 12:29:51 PM

Previous topic - Next topic

paulDiagnos

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.

TechSupport

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.

Elias Montoya

Egrid32 can do this, in case you are interested. :)

paulDiagnos

Hey Elias

erm excuse my ignorance but what is Egrid32?

Paul

tom cone jr

A 3rd party grid control.  Check out the 3rd party addons forum of the PowerBASIC message board, and then visit:

http://www.egrid32.com/

Elias Montoya

#5
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. :)