Board index » cppbuilder » Multiple lines in a TStringGrid Cell

Multiple lines in a TStringGrid Cell

Is it possible to insert a multiple line text string, e.g. using
'\n' in the string, in a TStringGrid cell?

Thanks in advance

 

Re:Multiple lines in a TStringGrid Cell


Hi Richard,

Quote
> Is it possible to insert a multiple line text string, e.g. using
> '\n' in the string, in a TStringGrid cell?

You can render formatted text to each cell manually by using the
StringGrid's OnDrawCell event and the DrawText() function.  There's a
rough code example here...

   http://bcbcaq.freeservers.com/sg_wordwrap.html

HTH,
--
Damon Chandler (TeamB)
- BCBCAQ <http://bcbcaq.freeservers.com>
- Graphics API Black Book <http://graphicsBB.itgo.com>

Other Threads