- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
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/