Subject | RE: [IBO] TIB_Grid embed a TButton |
---|---|
Author | IBO Support List |
Post date | 2014-04-29T14:07:55Z |
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of kostas@...
Sent: Tuesday, April 29, 2014 7:04 AM
To: IBObjects@yahoogroups.com
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);
begin
inherited;
with grPosView, qrPosView
do
begin
if Active and (ACol = 7) then
begin
BufferRowNum :=
DataRow[ARow];
if (BufferRowNum > 0)
then
begin
btn1.BoundsRect := Rect;
btn1.Visible :=
True;
end;{if}
end;{if}
end;{with}
end;
thanks a lot,
Kostas