首页 > 代码库 > 仿制用友U8界面
仿制用友U8界面
unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, dxSkinsdxNavBarPainter, dxSkinscxPCPainter, cxPCdxBarPopupMenu, cxPC, dxNavBarCollns, cxClasses, dxNavBarBase, dxNavBar, dxSkinsdxStatusBarPainter, dxStatusBar;type TForm1 = class(TForm) dxNavBar1: TdxNavBar; dxNavBar1Group1: TdxNavBarGroup; dxNavBar1Group2: TdxNavBarGroup; dxNavBar1Group3: TdxNavBarGroup; dxNavBar1Group4: TdxNavBarGroup; dxNavBar1Item1: TdxNavBarItem; dxNavBar1Item2: TdxNavBarItem; dxNavBar1Item3: TdxNavBarItem; dxNavBar1Item4: TdxNavBarItem; cxPageControl1: TcxPageControl; cxTabSheet1: TcxTabSheet; dxStatusBar1: TdxStatusBar; Procedure Addpage(cText:String); procedure dxNavBar1Item1Click(Sender: TObject); procedure dxNavBar1Item2Click(Sender: TObject); procedure dxNavBar1Item3Click(Sender: TObject); procedure dxNavBar1Item4Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}Procedure TForm1.Addpage(cText:String); Var I:integer; bNew:Boolean; TempTab:TcxTabSheet; begin bNew:=true; for I := 0 to Self.cxPageControl1.PageCount-1 do begin if cxpageControl1.Pages[i].Caption=cText then begin cxpagecontrol1.Properties.ActivePage:=cxpagecontrol1.Pages[i]; bNew:=False; end; end; IF bNew then begin TempTab:=TcxTabSheet.Create(cxpageControl1); TempTab.Caption:=cText; TempTab.PageControl:=cxpageControl1; cxPageControl1.Properties.ActivePage:=TempTab; end; end; procedure TForm1.dxNavBar1Item1Click(Sender: TObject); begin Addpage((Sender as TdxNavBarItem).Caption); end; procedure TForm1.dxNavBar1Item2Click(Sender: TObject);begin Addpage((Sender as TdxNavBarItem).Caption);end;procedure TForm1.dxNavBar1Item3Click(Sender: TObject);begin Addpage((Sender as TdxNavBarItem).Caption);end;procedure TForm1.dxNavBar1Item4Click(Sender: TObject);begin Addpage((Sender as TdxNavBarItem).Caption);end;end.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。