界面库

优化表格
This commit is contained in:
JianjunLiu
2022-11-08 10:43:43 +08:00
parent 9755b27f72
commit 08ec074bad
3 changed files with 39 additions and 4 deletions
+21 -1
View File
@@ -2593,8 +2593,28 @@ type TDgridctl = class(TDComponent)
cvs.drawtext(format('%d,%d',i,j),rec,DT_VCENTER .| DT_SINGLELINE .| DT_CENTER .| DT_NOPREFIX);
inherited;
");
ev := array(
"event":"onhitcellsizer",
"name":"hitsizer",
"param":array("o","e"),
"virtual":true,
"body":
" {**
@explan(说明) 命中单元格调整大小边框 %%
@param(o)(tgridctl) grid对象 %%
@param(e)(tuieventbase) 消息对象包括,等wparam=1 表示行=2 表示列,lparam为命中的行或者列序号 %%
**}
//绘制表头
//if e.wparam=1 then echo '\\r\\nrow:',e.lparam;
//if e.wparam=2 then echo '\\r\\ncol:',e.lparam;
if e.lparam<o.FixedRows or e.lparam<o.FixedColumns then //行列标不能调整宽度高度
begin
e.skip := true;//忽略调整宽度
end
inherited;"
);
SetDefalutEvent(ev,true);
end
end
type TDedit= class(TDComponent)
function HitTip();override;