QurbanDurrani
asked on
Font size of the text in a DBGrid
Please look at the sql in the related question for more info. Basically I have made the column width to a fixed number(70). It is too small to hold the entire Ip address if each octet is 3 digits. So how can I make the text that appears in the cells smaller? I tried the following, but did not work:
procedure TDNSForm.GatewayGridDrawCo lumnCell(S ender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if Column.Field.DataSet.RecNo = 1 then
(Sender as TDBGrid).Canvas.Font.Color := clMedGray
else
//(Sender as TDBGrid).Canvas.Font.Size := 2; // This line did not work either
Column.Font.Size := 4;
GatewayGrid.DefaultDrawCol umnCell(Re ct, DataCol, Column, State);
end;
procedure TDNSForm.GatewayGridDrawCo
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if Column.Field.DataSet.RecNo
(Sender as TDBGrid).Canvas.Font.Color
else
//(Sender as TDBGrid).Canvas.Font.Size := 2; // This line did not work either
Column.Font.Size := 4;
GatewayGrid.DefaultDrawCol
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help guys.
ASKER