J
JackKen
Unregistered / Unconfirmed
GUEST, unregistred user!
var
F1:TFont;
F2:TFont;
procedure TForm1.Button1Click(Sender: TObject);
begin
FontDialog1.Execute;
F1:=TFont.Create;
F1:=FontDialog1.Font;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
FontDialog1.Execute;
F2:=TFont.Create;
F2:=FontDialog1.Font;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Canvas.Font:=F1;
Canvas.TextOut(0,0,'Go!Go!Go!');
Form1.Canvas.Font:=F2;
Canvas.TextOut(0,50,'Go!Go!Go!');
end;
不知为何,输出时总是按F2的设定输出,F1不起作用。即不论Button1时如何设定字体,输出时两句话的字体颜色等属性都是F2的。请各位指教。
F1:TFont;
F2:TFont;
procedure TForm1.Button1Click(Sender: TObject);
begin
FontDialog1.Execute;
F1:=TFont.Create;
F1:=FontDialog1.Font;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
FontDialog1.Execute;
F2:=TFont.Create;
F2:=FontDialog1.Font;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Form1.Canvas.Font:=F1;
Canvas.TextOut(0,0,'Go!Go!Go!');
Form1.Canvas.Font:=F2;
Canvas.TextOut(0,50,'Go!Go!Go!');
end;
不知为何,输出时总是按F2的设定输出,F1不起作用。即不论Button1时如何设定字体,输出时两句话的字体颜色等属性都是F2的。请各位指教。