dialog - OPENDCL(AUTOCAD): avoid exiting modeless dialog if [ENTER] is pressed

标签 dialog lisp autocad modeless

我正在寻找一种方法,以避免在按下 [ENTER] 时退出 autocad(由 opendcl 创建)中的无模式对话框。

有什么想法吗?

谢谢, 丹尼斯

最佳答案

我已经为 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)
)

关于dialog - OPENDCL(AUTOCAD): avoid exiting modeless dialog if [ENTER] is pressed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29630881/

相关文章:

javascript - 链接页面的 HTML/JS 解释对话框

lisp - 如何生成一系列 Pell 数而不是 Lisp 中的特定数

带对话框保存文件的 Java 下载管理器

来自服务的 Angular 7 模态对话框/弹出窗口

lisp - 如何在 Common Lisp 中创建双向二进制流?

ms-access - 使用 Access 2007 中的 VBA 在 AutoCAD (dwg) 文件中搜索

c# - 有没有更快的方法来调试 ObjectARX 应用程序?

lisp - 如何按实体名称选择 Autocad 实体以用于 lisp 中的 autocad 命令

javascript - BootstrapDialog.alert() 未显示

lisp - 试图理解 setf + aref "magic"