hack...@gmail.com
unread,Jul 22, 2014, 4:22:04 PM7/22/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have a very simple program with one form and one button (see code below). This program will populate each cell of the StringGrid with the column and row number of the cell. How can I modify this to add multiple lines of strings in each cell? Ultimately, I'd like to use a StringGrid to display some driver scheduling information. I will be exracting data from a database table and populating the StringGrid based on a date (like a Calendar form). The problem I'm having is getting more than one line of text in a cell of a StringGrid.
----------------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
C, R: integer;
begin
StringGrid1.RowCount := 3;
StringGrid1.ColCount := 4;
for C := 0 to 4 do
for R := 0 to 2 do
StringGrid1.Cells[C, R] := Format('C: %d, R: %d', [C, R]);
end;
end.