文字样式对话框怎样才能插入自定义对话框
文字样式对话框的插入形式。
(defun c:test()
(setq f (vl-filename-mktemp "test.dcl"))
(setq of (open f "w"))
(write-line "test : dialog {" of)
(write-line "label = \"试验\" ;" of)
(write-line ":button {key = \"m\"; label = \"文字样式\";}" of)
(write-line "ok_only;" of)
(write-line "}" of)
(close of)
(setq dcl_id (load_dialog f))
(new_dialog "test" dcl_id)
(action_tile "m" "(vl-cmdf \"_.STYLE\")")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog dcl_id)
(vl-file-delete f)
)
自定义插入对话框无论何种形式,command或vl-cmdf均会产生错误
VEVAL-STR+ ARX 命令中发生异常
Unhandled Exception e06d7363 (e06d7363h) at address fd10be0dh
未处理的异常 e06d7363(e06d7363h) ,地址 fd10be0dh
(defun c:test()
(setq f (vl-filename-mktemp "test.dcl"))
(setq of (open f "w"))
(write-line "test : dialog {" of)
(write-line "label = \"试验\" ;" of)
(write-line ":button {key = \"m\"; label = \"文字样式\";}" of)
(write-line "ok_only;" of)
(write-line "}" of)
(close of)
(setq dcl_id (load_dialog f))
(new_dialog "test" dcl_id)
(action_tile "m" "(done_dialog 2)")
(action_tile "accept" "(done_dialog 1)")
(SETQ DD(start_dialog))
(IF (= DD 2)(T1))
(unload_dialog dcl_id)
(vl-file-delete f)
)
(DEFUN T1()
(vl-cmdf "_.STYLE")) liuhe 发表于 2023-12-4 18:47
象上面那样对话框重叠放置的有没有方法? zdqwy19 发表于 2023-12-4 19:46
象上面那样对话框重叠放置的有没有方法?
不可以调用command 命令,DCL必须是焦点,很多函数无法执行
页:
[1]