码迷,mamicode.com
首页 > 其他好文 > 详细

仿制用友U8界面

时间:2014-06-24 23:36:30      阅读:486      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   http   ext   

bubuko.com,布布扣

bubuko.com,布布扣bubuko.com,布布扣bubuko.com,布布扣bubuko.com,布布扣

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.

 

仿制用友U8界面,布布扣,bubuko.com

仿制用友U8界面

标签:style   class   blog   code   http   ext   

原文地址:http://www.cnblogs.com/wuxi15/p/3805638.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!