【对话框】 如何在二级对话框返回到一级对话框?(已解决)
本帖最后由 qcw911 于 2012-2-24 14:02 编辑(defun c:dlg ()
(setq dcl_id (load_dialog "dlg.dcl"))
(setq do_what 2)
(while (>= do_what 2)
(if (= null (new_dialog "dlg" dcl_id))
(progn
(princ "\n没有对话框")
(setq dialogshow nil)
(exit)
) ;_ end of progn
) ;_ end of if
(action_tile "button_A" "(done_dialog 1)")
(action_tile "button_B" "(done_dialog 2)")
(action_tile "button_C" "(done_dialog 3)")
(action_tile "button_T" "(done_dialog 4)")
;;; (action_tile "accept" "(done_dialog 1)")
(setq do_what (start_dialog))
(cond
((= do_what 1)
(next1)
)
((= do_what 2)
(next2)
)
((= do_what 3)
(next3)
)
((= do_what 4)
(next4)
)
;;; ((= do_what 5)
;;; (next5)
;;; )
) ;_ end of cond
) ;_ end of while
(unload_dialog dcl_id)
) ;_ end of defun
(defun next1 ()
(new_dialog "dlg_A" dcl_id)
(action_tile "A_1" "(done_dialog 1)")
(action_tile "return" "(done_dialog 2)(load_dialog dlg)")
(setq dial (start_dialog))
(if (= dial 1)
;;; (alert "调用A")
(command "line" (getpoint) (getpoint) "")
) ;_ end of if
;;; (unload_dialog dcl_i)
) ;_ end of defun
(defun next2 ()
(new_dialog "dlg_B" dcl_id)
(action_tile "B_1" "(done_dialog 1)")
(setq dial (start_dialog))
(if (= dial 1)
(alert "调用B")
) ;_ end of if
;;; (unload_dialog dcl_i)
)
(defun next3 ()
(new_dialog "dlg_C" dcl_id)
(action_tile "C_1" "(done_dialog 1)")
(setq dial (start_dialog))
(if (= dial 1)
(alert "调用C")
) ;_ end of if
;;; (unload_dialog dcl_i)
)
(defun next4 ()
(new_dialog "dlg_T" dcl_id)
(action_tile "T_1" "(done_dialog 1)")
(setq dial (start_dialog))
(if (= dial 1)
(alert "调用T")
) ;_ end of if
;;; (unload_dialog dcl_i)
)
dlg:dialog {
label = "lixil qiuw1" ;
:row {
label = "商品样式" ;
:column {
:button {
height = 3 ;
key = "button_A" ;
label = "A样式..." ;
width = 20 ;
}
:button {
height = 3 ;
key = "button_B" ;
label = "B样式..." ;
width = 20 ;
}
}
:column {
:button {
height = 3 ;
key = "button_C" ;
label = "C样式..." ;
width = 20 ;
}
:button {
height = 3 ;
key = "button_T" ;
label = "其他..." ;
width = 20 ;
}
}
}
cancel_button;
}
dlg_A:dialog {
label = "A样式" ;
:row {
:column {
:text {
label = "A-1样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "A_1" ;
width = 30 ;
}
}
:column {
:text {
label = "A-2样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "A_2" ;
width = 30 ;
}
}
}
:row {
:column {
:text {
label = "A-3样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "A_3" ;
width = 30 ;
}
}
:column {
:text {
label = "A-4样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "A_4" ;
width = 30 ;
}
}
}
:button {
key = "return";
label = "返回";
height = 3;
}
spacer_1;
cancel_button;
}
dlg_B:dialog {
label = "B样式" ;
:row {
:column {
:text {
label = "B-1样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_1" ;
width = 30 ;
}
}
:column {
:text {
label = "B-2样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_2" ;
width = 30 ;
}
}
:column {
:text {
label = "B-3样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_3" ;
width = 30 ;
}
}
}
:row {
:column {
:text {
label = "B-4样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_4" ;
width = 30 ;
}
}
:column {
:text {
label = "B-5样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_5" ;
width = 30 ;
}
}
:column {
:text {
label = "B-6样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "B_6" ;
width = 30 ;
}
}
}
:button {
key = "return";
label = "返回";
height = 3;
}
spacer_1;
cancel_button;
}
dlg_C:dialog {
label = "C样式" ;
:row {
:column {
:text {
label = "C-1样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "C_1" ;
width = 30 ;
}
}
:column {
:text {
label = "C-2样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "C_2" ;
width = 30 ;
}
}
}
:row {
:column {
:text {
label = "C-3样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "C_3" ;
width = 30 ;
}
}
:column {
:text {
label = "C-4样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "C_4" ;
width = 30 ;
}
}
}
:button {
key = "return";
label = "返回";
height = 3;
}
spacer_1;
cancel_button;
}
dlg_T:dialog {
label = "T样式" ;
:row {
:column {
:text {
label = "T-1样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_1" ;
width = 30 ;
}
}
:column {
:text {
label = "T-2样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_2" ;
width = 30 ;
}
}
:column {
:text {
label = "T-3样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_3" ;
width = 30 ;
}
}
:column {
:text {
label = "T-4样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_4" ;
width = 30 ;
}
}
}
:row {
:column {
:text {
label = "T-5样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_5" ;
width = 30 ;
}
}
:column {
:text {
label = "T-6样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_6" ;
width = 30 ;
}
}
:column {
:text {
label = "T-7样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_7" ;
width = 30 ;
}
}
:column {
:text {
label = "T-8样式" ;
}
:image_button {
color = black ;
height = 10 ;
key = "T_8" ;
width = 30 ;
}
}
}
:button {
key = "return";
label = "返回";
height = 3;
}
spacer_1;
cancel_button;
}
大家好
请大家帮帮忙
再二级对话框得界面
如何点击返回按钮
返回到一级去呢?
lisp 里面的(action_tile "return" "(done_dialog 2)(load_dialog dlg)")句话
怎么改呢?
很简单的,不需要特别的程序
fawn_lgc 发表于 2012-2-24 12:53 static/image/common/back.gif
很简单的,不需要特别的程序
如果你能帮我解决 我的问题我会很感激你的 (action_tile "return" "(done_dialog 2)(load_dialog dlg)")→→ → →(action_tile "return" "(done_dialog 2)(setq do_what 2)") 就ok了 自己悟出来了?真是高手!! qcw911 发表于 2012-2-24 14:01
(action_tile "return" "(done_dialog 2)(load_dialog dlg)")→→ → →(action_tile "return" "(done_d ...
我现在也有这个需求,没看懂怎么改的,怎么跳转到一级对话框的?
页:
[1]