TdxDockPanel

来源:互联网 发布:webservice添加数据 编辑:程序博客网 时间:2024/06/11 12:54
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;
原创粉丝点击