Delphi 如何在StringGrid中嵌入控件,如按钮等等


本文整理自网络,侵删。

 
//在StringGrid: SpaceGrid中指定的Col, Row嵌入一个ComboBox: SpacingCombo
var
Rect: TRect;
Pnt: TPoint;
begin
with SpaceGrid do
begin
Rect := CellRect(Col, Row);
with Rect do 
begin
Pnt := SpacingCombo.Parent.ScreenToClient((SpaceGrid.ClientToScreen(Point(Left, Top))));
SpacingCombo.SetBounds(Pnt.X, Pnt.Y, Right - Left, Bottom - Top);
SpacingCombo.Show;
end;
end;

更多介绍:https://wedelphi.com/t/50668/

相关阅读 >>

Delphi线程中关闭程序

Delphi tfdconnection只能取得50处理

Delphi firedac tfddatamove 导出csv

Delphi 关于 class helper for ... 语法

Delphi label1 自动尺寸

Delphi java 日期 转换 获取unix时间戳

Delphi ascii 码对照表

Delphi edit1.gettextlen 获取编辑框字符数

Delphi串口通信编程

Delphi 如何将memo或richedit保存为utf 8文本文件?

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...