Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DrawGrid edit mode - single click 1

Status
Not open for further replies.

Fifer74

Programmer
Feb 25, 2003
12
0
0
GB
Does anyone know if it is possible to get a drawgrid cell into 'edit' mode on the initial click of the cell. I currently have to select the cell and then double click it before it enters 'edit' mode. Due to other code I cannot use the goAlwaysShowEditor option of the grid control.

Thanks in advance
 
In the properties of your DrawGrid, expand the options and set the option goAlwaysShowEditor to true.
 
Sorry for the post, didn't fully read your question.
 
try this:

Code:
procedure TForm1.DrawGrid1Click(Sender: TObject);
var
  ACol, ARow : Integer;
begin
  ACol  := DrawGrid1.Col;
  ARow  := DrawGrid1.Row;
  DrawGrid1.EditorMode := true;
  DrawGrid1.CellRect(ACol,ARow);
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top