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 通过pid获取进程名

Delphi xe taskbar按钮用法

Delphi webbroker isapi 示例说明

Delphi processid, process handle, window handle 之间的互相转换

Delphi xe 的 tdictionary

Delphi strtoint 将“字符型”转换成“整数型”

Delphi 实现显示文件目录大小

Delphi 窗体的位置和高宽度-tform:letf、top、width、height、clientwidth、clientheight

Delphi xe8中的firemonkey应用程序将文本复制到剪贴板

Delphi 进程之间传递cmd参数

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



打赏

取消

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

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

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

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

评论

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