C++Builder
Wordwrap in a StringGrid
Wordwrap dans un StringGrid
 
The TStringGrid doesn't have a WordWrap property but it's possible to simulate it and get a satisfactory result.
All you have to do is set the DefaultDrawing property of the StringGrid to false and render the cell yourself using  the OnDrawCell event as below.
Le composant TStringGrid n'a pas de propriété WordWrap mais il est possible de l'implémenter de façon satisfaisante.
Il suffit de mettre la propiété DefaultDrawing du StringGrid à false et de dessiner soi-même le contenu des cellules dans l'événement OnDrawCell.
  

void __fastcall TForm1::StringGrid1DrawCell(TObject *Sender, int ACol,
      int ARow, TRect &Rect, TGridDrawState State)
{
  //if it's a fixed row or column
  if (State.Contains(gdFixed))
  {
      StringGrid1->Canvas->Brush->Color = clBtnFace;
      StringGrid1->Canvas->Font->Color = clWindowText;
      StringGrid1->Canvas->FillRect(Rect);
      Frame3D(StringGrid1->Canvas, Rect, clBtnHighlight, clBtnShadow, 1);
  } 
  //if the cell is selected
  else if (State.Contains(gdSelected)) 
  {
      StringGrid1->Canvas->Brush->Color = clHighlight;
      StringGrid1->Canvas->Font->Color = clHighlightText;
      StringGrid1->Canvas->FillRect(Rect);
  } 
  //in all other cases
  else 
  { 
      StringGrid1->Canvas->Brush->Color = StringGrid1->Color;
      StringGrid1->Canvas->Font->Color = StringGrid1->Font->Color;
      StringGrid1->Canvas->FillRect(Rect);
  } 
  TRect DrawRect = Rect;
  AnsiString CellText = StringGrid1->Cells[ACol][ARow];
  DrawText(StringGrid1->Canvas->Handle,CellText.c_str(),-1,
        &DrawRect,DT_WORDBREAK | DT_CALCRECT | DT_LEFT);
  if(StringGrid1->RowHeights[ARow] < (DrawRect.Bottom - DrawRect.Top) +2)
      StringGrid1->RowHeights[ARow] = (DrawRect.Bottom - DrawRect.Top) +2;
  DrawText(StringGrid1->Canvas->Handle,CellText.c_str(),CellText.Length(),
      &DrawRect,DT_WORDBREAK | DT_LEFT);
}