📄 scalef.pas
字号:
unit ScaleF;
interface
uses
SysUtils, Qt, Classes, QGraphics, QControls,
QForms, QDialogs, QStdCtrls, Spin, QMask, QComCtrls;
type
TForm1 = class(TForm)
ScaleButton: TButton;
RestoreButton: TButton;
Label1: TLabel;
SpinEdit1: TSpinEdit;
procedure ScaleButtonClick(Sender: TObject);
procedure RestoreButtonClick(Sender: TObject);
private
{ Private declarations }
AmountScaled: Integer;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.xfm}
procedure TForm1.ScaleButtonClick(Sender: TObject);
begin
AmountScaled := SpinEdit1.Value;
ScaleBy (AmountScaled, 100);
ScaleButton.Enabled := False;
RestoreButton.Enabled := True;
end;
procedure TForm1.RestoreButtonClick(Sender: TObject);
begin
ScaleBy (100, AmountScaled);
ScaleButton.Enabled := True;
RestoreButton.Enabled := False;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -