OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Aleksandr Tkachenko on July 29, 2008, 05:04:00 AM

Title: In Grid Control push Enter?
Post by: Aleksandr Tkachenko on July 29, 2008, 05:04:00 AM
Why Forms is closing when cursor in Grid and push Enter?
Title: Re: In Grid Control push Enter?
Post by: Fred Tomke on July 30, 2008, 03:53:35 AM
Hello,

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)
  (cancel_edit)
  (/= 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
Title: Re: In Grid Control push Enter?
Post by: Aleksandr Tkachenko on July 31, 2008, 04:26:20 AM
Thank you Fred, it's worked.