What use is TStringGrid->TextSettings->WordWrap

Roger Alcindor
Roger Alcindor used Ask the Experts™
on
what is the purpose of the property TStringGrid->TextSettings->WordWrap in an FMX  StringGrid when setting it to true appears to have no effect ? Especially with respect to word wrapping in cells. I am using the StringGrid in a windows application using Embarcadero C++ bulder XE 10.1 Berlin Update 2.
Searching on the web leads me to conclude that the only way to display wrapped text in a StringGrid appears to be drawing the cell contents with an OnDrawColumnCell event handler ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ste5anSenior Developer

Commented:
Can you post a screenshot showing what (not) happens?

Author

Commented:
I attach a screen-shot of the StringGrid display when the button is clicked and as you can see, the text is not word wrapped.

the code for the test program is as follows:

#include <fmx.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
	StringGrid1->TextSettings->WordWrap = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    StringGrid1->Cells[0][1] = Edit1->Text;
}
//---------------------------------------------------------------------------
[embed=file 1422604]

Open in new window

StringGridWordWrap.JPG

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial