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制作手机签名app(windows同样适用)

Delphi tfile

Delphi xe5实现按android的back键无法退出关闭程序

Delphi 获取中文/数字星期的函数

Delphi xe6 string转memorystream

Delphi webbrowser1 保存文档为 .mht

Delphi 一个线程安全的轻量级的日志类

Delphi检测用户超过5分钟没有操作键盘或鼠标

Delphi textfile utf8编码读写

Delphi webbrowser全选\复制\粘贴

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



打赏

取消

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

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

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

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

评论

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