程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> 仿制用友U8界面

仿制用友U8界面

編輯:Delphi

unit Unit1;

interface

uses
  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.

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved