dxDockPanel显隐

procedure TMainFormFrm.blbModelClick(Sender: TObject);
var
  lDockPanel: TdxDockPanel;
begin
  gGlobalObjects.Section.Enter;
  try
    lDockPanel := dxdpRoleView;
    if (lDockPanel = nil) then Exit;

    if TdxBarLargeButton(Sender).Down then
    begin
      if lDockPanel.DockState = dsUndocked then
      begin
        case TdxBarLargeButton(Sender).Tag of
          39: lDockPanel.Dock(dxdpPicture.ParentDockControl, lDockPanel.BoundsRect)
        else
          lDockPanel.Dock(dxdsFormSite, lDockPanel.BoundsRect)
        end;
      end;
      if not lDockPanel.Visible then
        lDockPanel.Visible := True;
      dxDockingController.ActiveDockControl := lDockPanel;
    end
    else begin
      lDockPanel.Visible := False;
    end;
  finally
    gGlobalObjects.Section.Leave;
  end;
end;

posted @ 2011-07-28 14:34  Jacc.Kim  阅读(494)  评论(0编辑  收藏  举报