In Grid Control push Enter?

Started by Aleksandr Tkachenko, July 29, 2008, 05:04:00 AM

Previous topic - Next topic

Aleksandr Tkachenko

Why Forms is closing when cursor in Grid and push Enter?

Fred Tomke


you can avoid that using the CancelClose event of the form. I do this, too.

(defun cancel_edit ()
  (if isLabelEdit (dcl_Grid_CancelItemEdit MyGrid))
); cancel_edit

(defun c:OnCancelClose (isESCWasPressed)
  (/= isESCWasPressed 1) ;; avoids closing form after ENTER
); CancelClose

(defun c:OnBeginLabelEdit (intRow ontCol)
  (setq isLabelEdit T)
  ;; ... someting else, too
); c:OnBeginLabelEdit

(defun c:OnEndLabelEdit (intRow ontCol)
  ;; ... someting else, too
  (setq isLabelEdit nil)
); c:OnBeginLabelEdit

Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Aleksandr Tkachenko