2008-11-25 20:48 UTC
Beta 5.0.1.3
OnCancelClose event is shown by definition to apply to File dialog, Modal dialog, and Modeless dialog. Does it also apply to a Control bar? My grid control is closing the control bar when enter pressed. It does not fire the OnCancelClose event. It also leaves a blank gray docked form after the control bar closes. I am working Fred Fred Tomke's example below.
;;handle escape and enter***
;;start edit event
(defun c:Onset_Outline_InfoGrid_OnBeginLabelEdit (row col)
(setq tcam:*isLabelEdit* T)
)
;;edit done event
(defun c:Onset_Outline_InfoGrid_OnEndLabelEdit (row col)
(setq tcam:*isLabelEdit* nil)
)
;;escape or enter event
(defun c:Onset_Outline_OnCancelClose (isESCWasPressed)
(tcam:cancelGridEdit Onset_Outline_InfoGrid)
;;return true to keep form from closing after ENTER
(/= isESCWasPressed 1)
)
;;general sub
;;cancel edit if in edit mode
(defun tcam:cancelGridEdit (ctrlName)
(if isLabelEdit
(dcl_Grid_CancelCellEdit ctrlName)
)
)
OnCancelClose event is shown by definition to apply to File dialog, Modal dialog, and Modeless dialog. Does it also apply to a Control bar? My grid control is closing the control bar when enter pressed. It does not fire the OnCancelClose event. It also leaves a blank gray docked form after the control bar closes. I am working Fred Fred Tomke's example below.
;;handle escape and enter***
;;start edit event
(defun c:Onset_Outline_InfoGrid_OnBeginLabelEdit (row col)
(setq tcam:*isLabelEdit* T)
)
;;edit done event
(defun c:Onset_Outline_InfoGrid_OnEndLabelEdit (row col)
(setq tcam:*isLabelEdit* nil)
)
;;escape or enter event
(defun c:Onset_Outline_OnCancelClose (isESCWasPressed)
(tcam:cancelGridEdit Onset_Outline_InfoGrid)
;;return true to keep form from closing after ENTER
(/= isESCWasPressed 1)
)
;;general sub
;;cancel edit if in edit mode
(defun tcam:cancelGridEdit (ctrlName)
(if isLabelEdit
(dcl_Grid_CancelCellEdit ctrlName)
)
)
