FNCGrid NoDisabledButtonLook feature

Hello,

I was wondering how to get the TAdvStringGrid.ControlLook.NoDisabledButtonLook in the TTMSFNCGrid.
I'm struggeling to have a cell with a button, which need to be clickable. But without the cell outside the button beeing editable.

Thanks for any help.


Hi,


What you can do is add a fixed cell, which is not editable. The button will still be clickable.



procedure TForm90.FormCreate(Sender: TObject);
begin
  TMSFNCGrid1.AddButton(3, 3, 'test', 50);
end;


procedure TForm90.TMSFNCGrid1CellButtonClick(Sender: TObject; ACol,
  ARow: Integer; ACell: TTMSFNCGridCell);
begin
  FMX.Types.Log.d('test');
end;


procedure TForm90.TMSFNCGrid1GetCellIsFixed(Sender: TObject; ACol,
  ARow: Integer; var ACellFixed: Boolean);
begin
  ACellFixed := (ACol = 3) and (ARow = 3);
end;


procedure TForm90.TMSFNCGrid1GetCellLayout(Sender: TObject; ACol, ARow: Integer;
  ALayout: TTMSFNCGridCellLayout; ACellState: TTMSFNCGridCellState);
begin
  if (ACellState = csFixed) and (ACol = 3) and (ARow = 3) then
    ALayout.Assign(TMSFNCGrid1.Appearance.NormalLayout);
end;



Thank you, it's working!