📄 main.~pas
字号:
unit Main;
interface
uses Windows, Classes, Graphics, Forms, Controls,
StyleD, ListD, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
ModallessButton: TButton;
Label6: TLabel;
GroupBox2: TGroupBox;
ModalButton: TButton;
Label7: TLabel;
Label1: TLabel;
procedure ModallessButtonClick(Sender: TObject);
procedure ModalButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.ModallessButtonClick(Sender: TObject);
begin
{ 使用Show方法来显示非模式窗体 }
StyleDial.Show;
end;
procedure TForm1.ModalButtonClick(Sender: TObject);
begin
with ListDial.Listbox1 do
begin
{ 使用ShowModal方法来显示非模式窗体 }
if (ListDial.ShowModal = mrOk) and (ItemIndex >= 0) then
{ 将模式对话框中选定条目的标题复制为标签的标题 }
Label1.Caption := Items [ItemIndex];
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -