buttonxmpleu.pas

来自「delphi win32api编程」· PAS 代码 · 共 38 行

PAS
38
字号
unit ButtonXmpleU;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Multilinebutton;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    Button1: TMultiLineButton;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Button1 := TMultiLineButton.Create(Self);
  Button1.Parent := self;
  Button1.Top := 10;
  Button1.Left := 10;
  Button1.Height := 70;
  Button1.Width := 150;
  Button1.Caption := 'This is a really really long button caption, which should wrap nicely within the confines of the button control'
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?