Subject RE: [IBO] TIB_Grid embed a TButton
Author IBO Support List
You don't place an actual button in a draw cell event.
You write code that paints the button on the canvas for that cell.
I haven't ever actually used this to paint a button but this would be a good addition to the sample apps.
Does anyone have some example code to share for this?

From: [] On Behalf Of kostas@...
Sent: Tuesday, April 29, 2014 7:04 AM
Subject: [IBO] TIB_Grid embed a TButton

Hello All,

I have a TIB_Grid as ReadOnly and would like to place a button in a cell.
The proberty EditLinks does not work, probably because my TIB_Grid ReadOnly is.
I have placed a button on the grid and the property visible is set to false.
In the event DrawCell I have tried to place the button. If the grid has only one record, the button is displayed.
Is more like a record exists, no button is displayed.

Does anyone have an idea?

procedure TfrUebersicht.grPosViewDrawCell(Sender: TObject; ACol,
 ARow: Integer; Rect: TRect; State: TGridDrawState);
 with grPosView, qrPosView do
   if Active and (ACol = 7) then
     BufferRowNum := DataRow[ARow];
     if (BufferRowNum > 0) then
       btn1.BoundsRect := Rect;
       btn1.Visible := True;


thanks a lot,