|
楼主 |
发表于 2007-5-29 18:32:33
|
显示全部楼层
这是窗体文件:
object Image1: TImage
Left = 320
Top = 56
Width = 40
Height = 32
Picture.Data = {
055449636F6E0000010001002020100000000000E80200001600000028000000
2000000040000000010004000000000080020000000000000000000000000000
0000000000000000000080000080000000808000800000008000800080800000
C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
FFFFFF000000000000000000000000000000000003F0B303B00AFFFA222A200D
9D9595000BF03B0B300AAFAFA2A2A009F959590003F0B303B00AFFFA222A2000
000000000BF03B0B300AAFAFA2A2A009F959590003F0B303B00AFFFA222A200D
FD9595000BF03B0B300AAFAFA2A2A009F959590003F0B303B00AFFFA222A200D
FD9595000BF03B0B30022A2222222009F959590003F0B303B0AAAFFAA2AA2A0D
F91115000BF03B0B30AAFFAFA2A2A209F000190003F0B303B002222A2222200D
F0F015000BF03B0B300AAFAFA2A2A009F080190003F0B303B00AFFFA222A200D
F08015000BF03B0B300AAFAFA2A2A009F080190003F0B303B00AFFFA222A200D
F08015000BF0000B300AAFAFA2A2A009F08019000B0BBB30B0002AA22222000D
F080150000BBB3B30000AFAFA2A20009F08019000FBBBB333000AFFAAA2A000D
F080150000BBB3B30000AFAFA2A20009F080190000FBBB330000AFFAAAAA000D
F0801500000BB3B00000000000000009F0801900000FBB30000000AAA200000D
F08015000000B300000000AAAA000009F08019000000B300000000FAA200000D
F0801500000000000000000FAA000009F0F019000000000000000000F200000D
F0801500000000000000000000000009F0F01900000000000000000000000000
07F700000000000000000000000000008B8B8000000000000000000000000000
0000000080600603000000010000000100000203000000010000000100000001
0000000100000001000000010000000100000001000000010000000100000001
00000001000000010020040100200401002004018060040180600401C0E00401
C0F81C01E1F81C01E1F81C01F3F81C01F3FC1C01FFFE1C01FFFFFC01FFFFFE03
FFFFFF07}
end
object Panel2: TPanel
Left = 231
Top = 0
Width = 540
Height = 599
Align = alClient
Caption = 'Panel2'
TabOrder = 0
object DataTreeList1: TDataTreeList
Left = 33
Top = 25
Width = 769
Height = 597
Bands = <
item
end>
HeaderPanelRowCount = 1
TabOrder = 0
LookAndFeel = lfFlat
TreeLineColor = clGrayText
end
object Button1: TButton
Left = 69
Top = 128
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
end
object DockStub1: TDockStub
Left = 0
Top = 0
Width = 231
Height = 599
Align = alLeft
Bar.Background.Color = 15332343
Bar.Border.TopLeft.Color = clNone
Bar.Border.TopLeft.Width = 0
Bar.Border.TopLeft.Height = 0
Bar.Border.Top.Color = clNone
Bar.Border.Top.Size = 0
Bar.Border.TopRight.Color = clNone
Bar.Border.TopRight.Width = 0
Bar.Border.TopRight.Height = 0
Bar.Border.Right.Color = clNone
Bar.Border.Right.Size = 0
Bar.Border.BottomRight.Color = clNone
Bar.Border.BottomRight.Width = 0
Bar.Border.BottomRight.Height = 0
Bar.Border.Bottom.Color = 15332343
Bar.Border.Bottom.Size = 2
Bar.Border.BottomLeft.Color = clNone
Bar.Border.BottomLeft.Width = 0
Bar.Border.BottomLeft.Height = 0
Bar.Border.Left.Color = clNone
Bar.Border.Left.Size = 0
Bar.Font.Charset = GB2312_CHARSET
Bar.Font.Color = clWindowText
Bar.Font.Height = -12
Bar.Font.Name = #23435#20307
Bar.Font.Style = []
Bar.Size = 23
Bar.Tab.Background.Color = clBtnFace
Bar.Tab.Border.TopLeft.Color = clNone
Bar.Tab.Border.TopLeft.Width = 0
Bar.Tab.Border.TopLeft.Height = 0
Bar.Tab.Border.Top.Color = clBtnShadow
Bar.Tab.Border.Top.Size = 0
Bar.Tab.Border.TopRight.Color = clNone
Bar.Tab.Border.TopRight.Width = 0
Bar.Tab.Border.TopRight.Height = 0
Bar.Tab.Border.Right.Color = clBtnShadow
Bar.Tab.Border.Right.Size = 1
Bar.Tab.Border.BottomRight.Color = clNone
Bar.Tab.Border.BottomRight.Width = 0
Bar.Tab.Border.BottomRight.Height = 0
Bar.Tab.Border.Bottom.Color = clBtnShadow
Bar.Tab.Border.Bottom.Size = 1
Bar.Tab.Border.BottomLeft.Color = clNone
Bar.Tab.Border.BottomLeft.Width = 0
Bar.Tab.Border.BottomLeft.Height = 0
Bar.Tab.Border.Left.Color = clBtnShadow
Bar.Tab.Border.Left.Size = 1
Bar.TabIndent = 20
AllowDockSides = [alRight]
AlwaysShowBar = True
object Panel1: TPanel
Left = 34
Top = 184
Width = 152
Height = 240
Caption = 'Panel1'
TabOrder = 6
object ListView1: TListView
Left = 1
Top = 1
Width = 150
Height = 238
Align = alClient
Checkboxes = True
Columns = <
item
end
item
end>
Items.Data = {
420000000200000000000000FFFFFFFFFFFFFFFF0100000000000000013104D5
C5C8FD00000000FFFFFFFFFFFFFFFF0100000000000000013204C0EECBC4FFFF
FFFF}
RowSelect = True
TabOrder = 0
ViewStyle = vsReport
end
end
end
调用代码:
rocedure TMainForm.Button1Click(Sender: TObject);
begin
Panel1.Width := Self.Width;
panel1.Height := self.Height;
DockStub1.BeginUpdate;
try
DockStub1.AddClient('DateTimePanel', Panel1, nil);
//DockStub1.ShowClient(Panel1);
finally
DockStub1.EndUpdate;
end;
end;
procedure TMainForm.BizFormCreate(Sender: TObject);
begin
DockStub1.InitControlConfigs(['DateTimePanel'], ['时间段'], [Image1.Picture], 180, 100, TDockKind.dkAutoHide,
TDockSide.alLeft, False,
[TDockWindowButton.wbAutoHide,TDockWindowButton.wbDock,TDockWindowButton.wbAutoHide],//, TDockWindowButton.wbHide],
[TDockKind.dkAutoHide,TDockKind.dkDocking]); //TDockKind.dkAutoHide,
end; |
|