Jump to content


HotICE

Member Since 08 Apr 2010
Offline Last Active Jun 20 2017 04:02 PM
-----

Posts I've Made

In Topic: NxToolbarColumn

22 October 2015 - 04:06 PM

thank you for direction to solve my problem.

 

Here is final code:

procedure TForm1.FormCreate(Sender: TObject);
var aC,aR:integer;
begin
  for aC := 0 to 4 do begin
    myGrid.AddRow();
    aR:=myGrid.LastAddedRow;
    myGrid.Cell[colBtn.Index,aC].Empty:=true;
  end;

  colBtn.HideWhenEmpty:=true;
end;

procedure TForm1.myGridBeforeSelect(Sender: TObject; var ACol, ARow: Integer;
  Key: Word; Shift: TShiftState);
begin
  if(myGrid.SelectedRow<>-1)then begin
    myGrid.Cell[colBtn.Index,myGrid.SelectedRow].Empty:=true;
  end;
end;

procedure TForm1.myGridSelect(Sender: TObject; ACol, ARow: Integer);
begin
  myGrid.Cell[colBtn.Index,myGrid.SelectedRow].Empty:=false;
  myGrid.Repaint();
end;

:rolleyes: :) B)


In Topic: NxToolbarColumn

22 October 2015 - 02:23 PM

Hi,

 

You are so fast for reply. :rolleyes:

 

But when i try set all cells in column to .empty:=true nothing happened.

Buttons are stil visible.

 

Any other solution? ;)