Multiline Cell in Grid Control
I'm trying to obtain multi-line text output in a grid cell. In
other words I would like the grid component (I'm working with the
TStringGrid specifically) to recognize the carriage return - line
feed combination ( chr(13) + chr(10) ) in a string and go to the
next line. I find this functionality to be quite useful for
displaying a grid of summaries of information about various other
data objects that I've got kicking around.
In my initial search for components with similar functionality I
noticed that the TMemo component has this ability while the TEdit
does not. After looking through the source for those two
components I found that the TEdit can be made to break lines by
adding an ' or ES_MULTILINE' to the Params.Style initialization
in the CreateParams routine for the TEdit component.
Params.Style := Params.Style or ES_MULTILINE;
Simply adding this to the same place in the
TStringGrid.CreateParams did not have the same effect (I'm not
surprised but I am disappointed ;').
I'm hoping that there is a better solution that overriding the
DrawCell procedure and cranking the rectangle used by the
ExtTextOut function down manually.
I'm feeling slightly out of my league on this one so any help
would be greatly appreciated.
__________________________________________________________________
Dan Reagan, drea...@morganco.com Worcester, MA