When switching between small fonts and large fonts, the AutoSize property of TLabel components does not work properly. As work-around, call the following procedure within the form's OnCreate event:
procedure LabelsAutoSizeCorrect (Form: TForm);
var i: integer;
Component: TComponent;
begin
for i := 0 to Form.ComponentCount - 1 do begin
Component := Form.Components [i];
if (Component is TLabel) and TLabel (Component).AutoSize then begin
TLabel (Component).AutoSize := false;
TLabel (Component).AutoSize := true;
end;
end;
end;
0 comments:
Post a Comment