- 积分
- 388
- 明经币
- 个
- 注册时间
- 2002-12-25
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2003-1-13 00:45:00
|
显示全部楼层
二位大侠:我又加了几个按钮,为什么不执行…………
// =========aw.dcl=对话框================================
aw : dialog {
label = "横竖图框";
: boxed_column {
label = "图框";
: image {
key = "show tit";
height = 12;
width = 10;
color = -2;
}
: radio_row {
key = "htit_vtit";
: radio_button {
label = "横图&H";
key = "htit";
}
: radio_button {
label = "竖图&V";
key = "vtit" ;
}}
:boxed_radio_row{
label="选择合适的图号";
key="nm_0_4";
:radio_button{
label="&0号";
key="n_m0";
}
:radio_button{
label="&1号";
key="n_m1";
}
:radio_button{
label="&2号";
key="n_m2";
}
:radio_button{
label="&3号";
key="n_m3";
value="1";
}
:radio_button{
label="&4号";
key="n_m4";
}
}
ok_cancel_help;
}
}
// =========sw.lsp=====================================
(defun c:aw ( / dcl_id x y hv)
(setq dcl_id (load_dialog "aw"))
(if (not (new_dialog "aw" dcl_id))(exit)) ;查找对话框文件
(action_tile "accept" "(done_dialog)")
(set_tile "htit_vtit" "htit")
(show_tit "htit")
(action_tile "htit_vtit" "(show_tit $value)")
(set_tile "n_0_4" "n_m3")
(start_dialog)
(unload_dialog dcl_id)
(command "_layer" "m" "图框" "t" "图框" "c" "251" '"" "")
(command "_zoom" "e" "")
(action_tile "n_m0" "a0")
(action_tile "n_m1" "a1")
(action_tile "n_m2" "a2")
(action_tile "n_m3" "a3")
(action_tile "n_m4" "a4")
(princ)
)
;;===============================================================
(defun show_tit(hv)
(setq x (dimx_tile "show tit")
y (dimy_tile "show tit"))
(start_image "show tit")
(fill_image 0 0 x y -2)
(cond ((= hv "htit")
(slide_image 0 0 x y "a2"))
((= hv "vtit")
(slide_image 0 0 x y "b2"))
(T
(slide_image 0 0 x y "a2"))
)
(end_image)
)
;;=======================a0===============================
(defun a0 ( / PT0 pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8)
(setq PT0 '(0 0) pt1 '(15 5) pt2 '(1204 5)
pt3 '(1204 846) pt4 '(15 846) pt5 '(1034 5)
pt6 '(1034 41) pt7 '(1204 41))
(command "_.LINE" "0,5" "0,0" "5,0" "")
(command "_.LINE" "1204,0" "1209,0" "1209,5" "")
(command "_.LINE" "1209,846" "1209,851" "1204,851" "")
(command "_.LINE" "5,851" "0,851" "0,846" "")
(command "_pline" pt1 "W" "0.5" "0.5" pt2 pt3 pt4 "c" "")
(command "_pline" pt5 "W" "0.5" "0.5" pt6 pt7"" "")
(setq pt8 '(912 0))
(command "_insert" "tm" "non" pt8 "" "" "")
(command "_zoom" "e" "")
) |
|