DCL单选按钮
谁能帮我一下吗?除单选按钮外,此对话框工作正常。目前,我可以从6个按钮中选择2个,但我只想从6个按钮中选择1个,我相信这与“radio\u column”或“radio\u row”有关,它们结合在一起只允许1个选择。
weld1 : dialog { label = "WELD NOTES 1 " ; width = 30; fixed_width = true;
:boxed_row {
: spacer { width = 10; }
: text { label = "WELD SIZE:"; alignment = bottom; is_bold = true;}
: edit_box { key = "ws1"; edit_width = 5; alignment = top; }
: spacer { width = 0;}}
:row {
: text { label = "PREDEFINED NOTES:"; is_bold = true; alignment = left; }
: spacer { width = 1;}
: text { label = "L/S"; alignment = center;}
: text { label = "R/S"; alignment = left ;}}
: spacer { width = 0;}
:row {
:column {
: text { label = "TYP SIM LOCATIONS "; alignment = left;}
: spacer { width = 0;}
: text { label = "TYP THESE ITEMS "; alignment = left;}
: spacer { width = 1.6;}
: text { label = "USER TEXT: "; alignment = left;}
: spacer { width = 6.5;}}
: column {
: radio_button { key = "lradbut1";}
: radio_button { key = "rradbut1";}
: radio_button { key = "lradbut2";}}
: column {
: radio_button { key = "rradbut2";}
: radio_button { key = "lradbut3";}
: radio_button { key = "rradbut3";}}}
ok_cancel ;
}
The Lisp File
(defun c:aa ( /ddiag dcl_id p1 d1 WeldSize)
(defun setVars ()
(setq WeldSize (distof (get_tile "ws1"))))
;(setq notes )
(setq dcl_id (load_dialog (findfile "weld1.dcl")))
(if (not (new_dialog "weld1" dcl_id))(exit))
(action_tile "ws" "(setq d1 (distof (get_tile \"ws\")))")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq ddiag (start_dialog))
(unload_dialog dcl_id)
(if (= ddiag 1)
(progn
(setq p1 (getpoint "\nPick a point "))
(command-s "_line" p1 (polar p1 (deltadtr 0) d1) "")
)
)
(princ)
)
也许试试这个
: row {
: boxed_radio_column {
使用radio_群集磁贴可能会起作用:
http://www.theswamp.org/index.php?topic=52731.msg576158#msg576158
但请注意以下评论:
http://www.theswamp.org/index.php?topic=52731.msg576177#msg576177
否则,您必须使用Lisp代码来确保只能选择一个收音机。
页:
[1]