标签:messages imp .class proc cli apt category 参考 sse
https://blog.csdn.net/kampan/article/details/6444139
1 unit Unit1; 2 3 interface 4 5 uses 6 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ToolPanels, Vcl.ExtCtrls, Vcl.StdCtrls; 8 9 type 10 TForm1 = class(TForm) 11 AdvToolPanelTab1: TAdvToolPanelTab; 12 AdvToolPanel1: TAdvToolPanel; 13 AdvToolPanel2: TAdvToolPanel; 14 CategoryPanelGroup1: TCategoryPanelGroup; 15 CategoryPanel1: TCategoryPanel; 16 Button1: TButton; 17 Button2: TButton; 18 btn1: TButton; 19 btn2: TButton; 20 CategoryPanel2: TCategoryPanel; 21 procedure btn2Click(Sender: TObject); 22 private 23 { Private declarations } 24 public 25 { Public declarations } 26 end; 27 28 var 29 Form1: TForm1; 30 31 implementation 32 33 {$R *.dfm} 34 35 procedure TForm1.btn2Click(Sender: TObject); 36 var 37 i: integer; 38 lv_CategoryPanel: TCategoryPanel; 39 lv_CategoryPanelGroup: TCategoryPanelGroup; 40 lv_AdvToolPanel: TAdvToolPanel; 41 lv_Butten: TButton; 42 begin 43 //准备插入系统 44 lv_AdvToolPanel := TAdvToolPanel.Create(AdvToolPanelTab1); 45 lv_AdvToolPanel.Caption := ‘参考系统A‘; 46 AdvToolPanelTab1.InsertPanel(lv_AdvToolPanel); 47 48 //准备插入菜单容器Group 49 lv_CategoryPanelGroup := TCategoryPanelGroup.Create(nil); 50 lv_CategoryPanelGroup.Parent := lv_AdvToolPanel; 51 lv_CategoryPanelGroup.Align := alClient; 52 53 //准备插入菜单框Panel 54 for i := 0 to 1 do 55 begin 56 lv_CategoryPanel := TCategoryPanel.Create(nil); 57 lv_CategoryPanel.Align := alTop; 58 lv_CategoryPanel.Caption := ‘菜单Panel‘ + IntToStr(i+1); 59 lv_CategoryPanel.Parent := lv_CategoryPanelGroup; 60 try 61 lv_CategoryPanel.PanelGroup := lv_CategoryPanelGroup; 62 except 63 // ShowMessage(‘ddd‘); 64 end; 65 end; 66 67 //插入btn 68 for i := 0 to 2 do 69 begin 70 lv_Butten := TButton.Create(lv_CategoryPanel); 71 lv_Butten.Parent := lv_CategoryPanel; 72 lv_Butten.Align := alTop; 73 lv_Butten.Caption := ‘Butten‘ + IntToStr(i+1); 74 end; 75 end; 76 77 end.
标签:messages imp .class proc cli apt category 参考 sse
原文地址:https://www.cnblogs.com/studycode/p/9857654.html