procedure TForm1.PaintBox1Paint(Sender: TObject);
var
I : Integer;
begin
for i := 0 to 99 do
begin
PaintBox1.Canvas.Font.Size := 12;
PaintBox1.Canvas.TextOut(10,i * 18,'大小');
end;
end;
var
I : Integer;
begin
for i := 0 to 99 do
begin
PaintBox1.Canvas.Font.Size := 12;
PaintBox1.Canvas.TextOut(10,i * 18,'大小');
end;
end;
--
PaintBox1.Canvas.Font.Name := '宋体';
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;type
TForm1 = class(TForm)
ScrollBox1: TScrollBox;
PaintBox1: TPaintBox;
procedure FormCreate(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
ScrollBox1.VertScrollBar.Range := 1000;
ScrollBox1.Height := 241;
end;procedure TForm1.PaintBox1Paint(Sender: TObject);
var
I : Integer;
begin
for i := 0 to 99 do
begin
PaintBox1.Canvas.Font.Size := 12;
PaintBox1.Canvas.TextOut(10, i * 18, '´óС');
end;
end;end.