OnSelectCell (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code ensures that you cannot select a cell unless it is empty.

Code

void __fastcall TForm1::StringGrid1SelectCell(TObject *Sender, int ACol, int ARow,
		  bool &CanSelect)
{
  CanSelect = (StringGrid1->Cells[ACol][ARow]== "");
}

Uses