Board index » cppbuilder » displaying integer values in a StringGrid

displaying integer values in a StringGrid


2003-11-28 01:14:50 AM
cppbuilder99
Hello,
Can anyone please tell me how to convert integers to Strings so that I can
display them in a StringGrid.
I'm sure it's very easy, but it's driving me mad!
Thanks,
Martin.
 
 

Re:displaying integer values in a StringGrid

thanks to both you.
Martin.
"Hans Galema" < XXXX@XXXXX.COM >wrote in message
Quote
Martin Crowley wrote:

>Can anyone please tell me how to convert integers to Strings so that I
can
>display them in a StringGrid.
>I'm sure it's very easy, but it's driving me mad!

int position = 123;

StringGrid1->Cells[2][3] = IntToStr ( position );

or
StringGrid1->Cells[2][3] = position;

or
AnsiString Pos = position;

StringGrid1->Cells[2][3] = Pos;

Hans.

 

Re:displaying integer values in a StringGrid

"Martin Crowley" < XXXX@XXXXX.COM >wrote in message
Quote
Can anyone please tell me how to convert integers to Strings so that I can
display them in a StringGrid.
I'm sure it's very easy, but it's driving me mad!
Try this:
String S = IntToStr(5);
--
Nate
www.kkjz.org/music/
America's Jazz Station
XXXX@XXXXX.COM
 

{smallsort}

Re:displaying integer values in a StringGrid

Martin Crowley wrote:
Quote
Can anyone please tell me how to convert integers to Strings so that I can
display them in a StringGrid.
I'm sure it's very easy, but it's driving me mad!
int position = 123;
StringGrid1->Cells[2][3] = IntToStr ( position );
or
StringGrid1->Cells[2][3] = position;
or
AnsiString Pos = position;
StringGrid1->Cells[2][3] = Pos;
Hans.