Delphi how to store button in StringGrid

I have StringGrid having buttons in table for some actions… There is my way to show buttons in grid: first is to fill table with cell values… secound is to assign cell with button var b:TspeedButton; r:Trect; begin r:= StringGrid1.CellRect(1,1); b:=TSpeedButton.Create(StringGrid1); b.Parent:=StringGrid1; b.Top:=r.Top; b.Left:=r.Left; b.Height:=r.Bottom-r.Top; b.Width:=r.right-r.right; b.Visible:=true; b.Caption:=’Test’; b.OnClick:=SpeedButtonClick; StringGrid1.Objects[col,i]:=b; StringGrid1.InvalidateCell(1,1); end;