bestlong 怕失憶論壇
標題:
取得文字的字型之寬與高的像素數
[打印本頁]
作者:
bestlong
時間:
2007-10-20 09:34
標題:
取得文字的字型之寬與高的像素數
procedure TForm1.FormCreate(Sender: TObject);
begin
Label1.Caption := 'Width is ' + IntToStr(Form1.Canvas.TextWidth(Edit1.Text)) + ' pixels';
Label2.Caption := 'Height is ' +IntToStr(Form1.Canvas.TextHeight(Edit1.Text)) + ' pixels';;
end;
複製代碼
歡迎光臨 bestlong 怕失憶論壇 (http://www.bestlong.idv.tw/)
Powered by Discuz! X1.5