Edit Table edit mode (OpenInsight 32-bit)
At 10 OCT 2020 04:48:11AM cmeyer wrote:
Is there a way of putting a cell in edit mode (F2) on the poschanged event when the cell is blank.
There have been many occasions where the user wants to paste into and edit table cell and every time I have to remind the user to press F2 (edit mode) on the highlighted cell before right clicking and paste.
Any advice would be appreciated.
Chris
At 10 OCT 2020 05:04PM Barry Stevens wrote:
Is there a way of putting a cell in edit mode (F2) on the poschanged event when the cell is blank.
There have been many occasions where the user wants to paste into and edit table cell and every time I have to remind the user to press F2 (edit mode) on the highlighted cell before right clicking and paste.
Any advice would be appreciated.
Chris
try:
bEditing = Exec_Method( ctrlEntiD, "BEGINEDIT", colNum, rowNum )
At 10 OCT 2020 05:14PM Carl Pates wrote:
Hi Barry,
That will work for v10 - for v9 it needs direct Windows SendMessage calls:
equ DTM_EDITCURRCELL$ to ( 1024 + 95 ) equ DT_BEGINEDIT$ to 1 equ DT_ENDEDIT$ to 2 equ DT_ABORTEDIT$ to 3 editCell: * // This method puts the current cell into edit mode * // * // object -> Name of the edit table * // * // param1 -> EditFlag : TRUE$ (the default) to begin editing, FALSE$ to * // turn off the editing. * // * // param2 -> SelectFlag: If EditFlag is TRUE then setting this argument * // to TRUE turns off the automatic selection of text when the * // edit table cell is edited hwndEdt = ps_Get_Property( object, "HANDLE" ) if hwndEdt then if len( param1 ) then if param1 then editFlag = DT_BEGINEDIT$ end else editFlag = DT_ENDEDIT$ end end else editFlag = DT_BEGINEDIT$ end call sendMessage( hwndEdt, DTM_EDITCURRCELL$, editFlag, 0 ) if ( editFlag = DT_BEGINEDIT$ ) then if param2 then call set_Property( object, "SELECTION", 1 : @fm : 0 ) end end end return
At 11 OCT 2020 12:06AM cmeyer wrote:
Thanks Carl,
That worked perfectly.
Chris