请问版主如何在对话框取得返回值并将它显示在前面相应的编辑框中?
感谢版主上次的指教,现在点击"浏览"按钮已经没问题了,但它的返回值却得不到,请问如何取得返回值并将它显示在前面相应的编辑框中?谢谢!defun c:qx ()<BR> (setq dcl_id (load_dialog "qx6.dcl"))<BR> (if (not (new_dialog "qx6" dcl_id)) (exit))<BR> (set_tile "fi" "")<BR> (set_tile "zh" "0")<BR> (set_tile "zhju" "200")<BR> (set_tile "fi2" "SEGMENT")<BR> (mode_tile "fi" 2)<BR> (action_tile "accept" "(ok)")<BR> <BR> (action_tile "filein" "(getf)") ; 注意 执行的操作在引号中<BR> (action_tile "fileout" "(outf)")<BR> <BR> (start_dialog )<BR> (done_dialog)<BR> (unload_dialog dcl_id)<BR>)
(defun getf ()<BR> (getfiled "请选择转点文件" "" "" 10)<BR>)
(defun outf ()<BR> (getfiled "请输入计算成果文件名" "" "lsp" 5)<BR>)
(defun ok ( )<BR> (setq fi (get_tile "fi")) ;手工输入的数据文件名<BR> (setq zh (atof (get_tile "zh")))<BR> (setq zhju (atof (get_tile "zhju")))<BR> (setq fi2 (get_tile "fi2")) ;;手工输入的数据文件名<BR> (setq filein (get_tile "filein")) ;点击"浏览"菜单得到的文件名
(setq fileout (get_tile "filein")) ;点击"浏览"菜单得到的文件名 <BR> (done_dialog)<BR>)
======以下是dcl ==================
qx6:dialog{<BR> label = "圆曲线元素计算";<BR>:row {<BR> :edit_box{<BR> label = "转点文件名";<BR> mneonic = "N";<BR> key = "fi";<BR> edit_width =10;<BR> }<BR> :button{<BR> label = "浏览";<BR> key = "filein";<BR> width = 1;<BR> height = 1;<BR> mnemonic= "B";<BR> }<BR>}<BR> :edit_box{<BR> label = "起始点桩号";<BR> mneonic = "N";<BR> key = "zh";<BR> edit_width =20;<BR> }<BR> :edit_box{<BR> label = "桩 距";<BR> mneonic = "N";<BR> key = "zhju";<BR> edit_width =20;<BR> }<BR>:row {<BR> :edit_box{<BR> label = "成果文件名";<BR> key = "fi2";<BR> edit_width =10;<BR> }<BR> :button{<BR> label = "浏览";<BR> key = "fileout";<BR> width = 1;<BR> height = 1;<BR> mnemonic= "B";<BR> }<BR>}
spacer_1;<BR> ok_cancel_err;<BR>}<BR>;=======真是每一步都很难========
;谢谢!
回复
(defun getf ( / strFile)<BR> (setq strFile (getfiled "请选择转点文件" "" "" 10))<BR> (set_tile "fi" strFile)<BR>)多谢指教!
页:
[1]