Centering Row (0) and Column (0)
Posted: Wed Feb 20, 2008 10:32 am
Hi,
Have just recently upgraded to version 3.x, from ver 2.x
I am trying to center column (0) where the row numbers will appear
the following worked fine on ver 2.x
procedure TFmEd.GridGetCellFormat(Sender: TObject; Col, Row: Integer;
State: TGridDrawState; var FormatOptions: TFormatOptions);
begin
if (Row = 0) or (Col = 0) then
FormatOptions.AlignmentHorz := taCenter;
end;
Only Row (0) is being centered
has the method changed in 3.x
Also, does anyone know a quick way to autosize all columns based on the cell in each column that has the largest text/number, like in Excel where you double click the required columns to autofit
Thanks for looking
Raymond
Have just recently upgraded to version 3.x, from ver 2.x
I am trying to center column (0) where the row numbers will appear
the following worked fine on ver 2.x
procedure TFmEd.GridGetCellFormat(Sender: TObject; Col, Row: Integer;
State: TGridDrawState; var FormatOptions: TFormatOptions);
begin
if (Row = 0) or (Col = 0) then
FormatOptions.AlignmentHorz := taCenter;
end;
Only Row (0) is being centered
has the method changed in 3.x
Also, does anyone know a quick way to autosize all columns based on the cell in each column that has the largest text/number, like in Excel where you double click the required columns to autofit
Thanks for looking
Raymond