From def92b203f340c0eaf2425368b0fa0a34248a2a6 Mon Sep 17 00:00:00 2001 From: sgwp <63001967@qq.com> Date: Wed, 23 Oct 2024 13:46:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=BC=BA=E5=88=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=BF=87=E6=BB=A4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public10/design/U_WindowFormdesign.pas | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/public10/design/U_WindowFormdesign.pas b/public10/design/U_WindowFormdesign.pas index f8580de..878f7cc 100644 --- a/public10/design/U_WindowFormdesign.pas +++ b/public10/design/U_WindowFormdesign.pas @@ -194,7 +194,6 @@ begin setGridButton.Parent := TToolBar(mForm.Components[i]); setGridButton.ImageIndex := 16; //) setGridButton.Caption:='表格列设置'; - // setGridButton.Name:='TgridLiSet'; setGridButton.Style := tbsButton; setGridButton.AutoSize:=true; @@ -377,8 +376,10 @@ begin // 窗口背景色 try - for i := 0 to mForm.ControlCount - 1 do + for i := 0 to mForm.ComponentCount - 1 do begin + if not ( mForm.Components[i] is TcxGrid) and not( mForm.Components[i] is TToolBar) and not( mForm.Components[i] is TdxCustomLayoutControl) then Continue; + if mForm.Components[i] is TcxGrid then begin if mForm.Components[i].Tag>=999 then Continue; @@ -386,6 +387,7 @@ begin //自动响应过滤 TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).dataController.filter.AutoDataSetFilter := true; + TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).optionsCustomize.columnfiltering := true; TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).OnSelectionChanged := cxGridViewSelectionChanged; TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).OnCustomDrawIndicatorCell := cxGridViewCustomDrawIndicatorCell; TcxGridDBTableView(TcxGrid(mForm.Components[i]).Views[0]).optionsCustomize.columnfiltering := true; @@ -433,7 +435,17 @@ begin SetFormOperRight(application,TToolBar(mForm.Components[i]), PWideChar(mRightCaptions)); continue; end; - + if mForm.Components[i] is TdxCustomLayoutControl then + begin + if mForm.Components[i].Tag<999 then + TdxLayoutControl(mForm.Components[i]).ParentFont:=true; + if mForm.Components[i].Tag<>1000 then + begin + TdxLayoutControl(mForm.Components[i]).OnDblClick := dxLayoutControl1DblClick ; + readLayOut(TdxLayoutControl(mForm.Components[i]),ADOTmp,PWideChar( fDllFileName+'|'+mForm.name+'|'+TdxLayoutControl(mForm.Components[i]).Name+'.ini')); + end; + continue; + end; end; except showMessage('窗口初始化异常!');