本帖最后由 ZZXXQQ 于 2015-11-29 08:19 编辑
- (defun c:tt ()
- ;;;;;对话框
- (vl-load-com)
- (setq newname (vl-filename-mktemp "txsize.dcl")
- f (open newname "w"))
- (write-line "txsize:dialog{label="文字高度设置";" f)
- (write-line ":edit_box{label="文字高度";key="txtsiz";is_default=ture;}" f)
- (write-line ":list_box{label="选择字高";key="zgxz";is_default=ture;}" f)
- (write-line "ok_only;} " f)
- (close f)
- (new_dialog "txsize" (setq dcl_id (load_dialog newname)))
- (set_tile "txtsiz" "45")
- (start_list "zgxz")
- (mapcar 'add_list (setq zgxz (list "1.0" "1.5" "2.0" "3.0" "5.0" "10.0" "15.0" "20.0" "25.0" "30.0")))
- (end_list)
- (action_tile "OK" "(get_maisiz)(done_dialog 1)")
- (action_tile "zgxz" "(set_tile "txtsiz" (nth (atoi(get_tile "zgxz")) zgxz))")
- (setq dd (start_dialog))
- (if (= dd 1) (princ pp))
- (start_dialog)
- (unload_dialog dcl_id)
- (vl-file-delete newname)
- (princ)
- )
- (defun get_maisiz ()
- (setq pp (get_tile "txtsiz"))
- (print "AA")
- (print pp)
- )
|