Place 2 grids GRIDA and GRIDB on a form.
AddButtonColumn to both grids - do NOT add AText to the column:
procedure TFormTestFNCGrid.FormShow(Sender: TObject);
begin
GridA.AddButtonColumn(0,'');
GridB.AddButtonColumn(0,'');
end;
Now assign two different images to the button column:
procedure TFormTestFNCGrid.GridAGetCellProperties(Sender: TObject; ACell: TTMSFNCDataGridCell);
begin
if ACell.IsButtonCell then
begin
ACell.AsButtonCell.Button.Images:=VirtualImageList;
ACell.AsButtonCell.Button.ImageIndex:=0;
end;
end;
procedure TFormTestFNCGrid.GridBGetCellProperties(Sender: TObject; ACell: TTMSFNCDataGridCell);
begin
if ACell.IsButtonCell then
begin
ACell.AsButtonCell.Button.Images:=VirtualImageList;
ACell.AsButtonCell.Button.ImageIndex:=1;
end;
end;
Both grids show the same image unless mouse move over buttons GRIDA.
But: NO BUG when AText is added to one of the grids like: GridA.AddButtonColumn(0,'hello');