2015-04-14 48 views

回答

1

我實現這樣的功能對於OpenDCL網格系統。您必須激活窗體上的OnCancelClose功能。這是我做到的:

(defun c:MyFunction_Form1_OnCancelClose (Reason /) 
    ;; Reason = 0 when Enter is pressed 
    (if (= Reason 0) 
     (progn 
      ;; Shift active editing cell one row down 
      (setq rowAndCol(dcl_Grid_GetCurCell MyFunction_Form1_revisions)) 
      (dcl_Grid_StartCellEdit MyFunction_Form1_revisions (1+ (car rowAndCol)) (cadr rowAndCol)) 
     ) 
    ) 

    ;; Reason = 1 when ESC key is pressed, or the closing button in the titlebar 
    ;; is clicked. Hence, enter won't work to cancel the dialog 
    (/= Reason 1) 
) 
相關問題