Board index » cppbuilder » Re: Line break in the TStringGrid

Re: Line break in the TStringGrid


2005-12-02 07:52:15 PM
cppbuilder73
Artur wrote:
Quote
How may I do the line break in the TStringGrid's cell ???
For example:
-----------------------
| asasa asasas dfdfds |
| ddsfdsf sdfdsf dsfd |
-----------------------
Set the OwnerDraw property to true and implement the OnDrawCell event
where you use TextOut to draw the text yourself. Adjust the rowheight
also.
Hans.
 
 

Re:Re: Line break in the TStringGrid

Hello,
How may I do the line break in the TStringGrid's cell ???
For example:
-----------------------
| asasa asasas dfdfds |
| ddsfdsf sdfdsf dsfd |
-----------------------
Best regards,
Artur
 

Re:Re: Line break in the TStringGrid

Your question is about C++ Builder but is posted here, in the newsgroup for
the old Borland C++ compiler. Try asking in one of the C++ Builder
newsgroups where more people familiar with that product will see your
message. Those newsgroups have the word 'cppbuilder' in their name.
 

{smallsort}

Re:Re: Line break in the TStringGrid

"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
use TextOut to draw the text yourself
Use DrawText() instead of TextOut(). DrawText() takes a RECT as a parameter
that can be used to limit the drawing to the bounds of each cell without
crossing the grid lines. TextOut() cannot do that. Also, DrawText() has a
DT_WORDBREAK flag specifically for drawing multi-line text.
Gambit