☆Buttonのキャプションを複数行表示にする。
type TDummyButton = class(TButtonControl); procedure TForm1.FormCreate(Sender: TObject); begin TDummyButton(Button1).WordWrap := True; Button1.Caption := 'こんな風に複数行の'+#13#10+ 'キャプション表示が' +#13#10 + 'できます。'; end;
別の方法としてabout.com Delphi Programmingでは、複数のボタンをその親コンポーネントを指定することにより一度に設定する方法が紹介されています。こちらは、SetWindowLongを使った処理になっています。
about.com Delphi Programming
TButton with multiline Caption
| 固定リンク