起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 255|回复: 7

【搞定】DockStub收缩的问题?[请求]**

[复制链接]
发表于 2007-5-29 15:27:58 | 显示全部楼层 |阅读模式
(见图)。
当“时间段”面板收缩的时候,panel2的大小怎么才能自动扩大到整个窗体?
其中,我已将时间段(DockStub)的Align属性设为了alLeft,panel2的align属性设为了alClient。

1.png

46.06 KB, 下载次数: 168

回复

使用道具 举报

发表于 2007-5-29 16:49:32 | 显示全部楼层
我们也同样想知道方法,管理员说一下把!!
回复 支持 反对

使用道具 举报

发表于 2007-5-29 16:55:15 | 显示全部楼层
管理员在吗
回复 支持 反对

使用道具 举报

发表于 2007-5-29 18:14:24 | 显示全部楼层
把窗体何窗体上所有控件的属性贴上来看看

在Studio中,在窗体上,Ctrl+A,然后Ctrl+c
然后在论坛的文本框上Ctrl+V
回复 支持 反对

使用道具 举报

 楼主| 发表于 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;
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-30 09:31:23 | 显示全部楼层
楼主,给个响应吗。。。。
回复 支持 反对

使用道具 举报

发表于 2007-5-30 10:40:22 | 显示全部楼层
DockStub1设置成alClient
Panel2放到DockStub1中
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-30 11:17:14 | 显示全部楼层
ok
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-1-11 00:36 , Processed in 0.044355 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表