solved -- see post 3 for answer.
hi, i'm not sure this has been asked, but. how does one set the cell into edit mode without having to double click the cell?
i want to similar excel's F2 command, where, when you are cursoring around the grid, and you press the F2 key, it puts you into edit mode.
i tried testing with nextgrid1.onclick(self) but that breaks me back into the IDE.
enter a cell in edit mode, like excel's F2 command?
Started by d6user, Sep 21 2013 05:14 PM
excel edit mode
2 replies to this topic
#1
Posted 21 September 2013 - 05:14 PM
#2
Posted 21 September 2013 - 08:19 PM
this code not working, although i've tried many different variation of code.
ng1 = nextgrid1
i am capturing the F2 keypress, see VK_F2.
or maybe simpler.., how do i call OnCellDblClick so that i can enter into Edit Mode?
writing: nextgrid1.OnCellDblClick(self) causes breaking out of the application.
procedure TForm1.ng1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin // insert row via INS key if key=VK_INSERT then InsRow1.Click; // capture F2 keypress if key=VK_F2 then ng1.OnCellClick(self,gl_gridcolno,gl_gridrowno); end;
ng1 = nextgrid1
i am capturing the F2 keypress, see VK_F2.
or maybe simpler.., how do i call OnCellDblClick so that i can enter into Edit Mode?
writing: nextgrid1.OnCellDblClick(self) causes breaking out of the application.
#3
Posted 21 September 2013 - 08:46 PM
solved -- it was nextgrid1.EditCell(col,row), will bring cell into edit mode.
note, i am capturing the col/row in the .ng1SelectCell(Sender: TObject; ACol, ARow: Integer); routine.
procedure TForm1.ng1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin // insert row via INS key if key=VK_INSERT then InsRow1.Click; // capture F2 keypress if key=VK_F2 then ng1.EditCell(gl_GridColNo,gl_GridRowNo); end;
note, i am capturing the col/row in the .ng1SelectCell(Sender: TObject; ACol, ARow: Integer); routine.
Also tagged with one or more of these keywords: excel, edit mode
NextSuite v5 - VCL Components (Previous version) →
NextGrid Component →
Copy/Paste to/from ExcelStarted by m610, 12 Aug 2015 |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users










