dear all
please chk some error at code
(defun c:txa()
(setq dclname
(cond
((setq tempname (vl-filename-mktemp "txa-tmp.dcl") filen (open tempname "w"))
(foreach stream
'(
"txa:dialog{\n"
" label=\"tt\";\n"
" :popup_list{ \n"
" key=\"align\";\n"
" edit_width=10;\n"
" allow_accept=true;\n"
" }\n"
" spacer;\n"
" ok_cancel;\n"
" }\n"
"\n"
)
(princ stream filen)
)
(close filen)
tempname
)))
;;--------------
(defun txa-show_popup_list (key slist)
(start_list key)
(mapcar 'add_list slist)
(end_list)
)
;;------------
(defun txa-show_popup_list_vlaue (index key slist)
(set_tile key index)
(nth (atoi index) slist)
)
(setq alignname_lst '("Left" "Right" "Align" "Center" "Top right" "Top left" "Center" "Middle right" "Middle left" "Lower Left" "Lower right"))
(setq dclid (load_dialog dclname))
(new_dialog "txa" dclid)
(txa-show_popup_list "align" alignname_lst)
(action_tile "align" "(txa-show_popup_list_vlaue $value "align" alignname_lst)")
(start_dialog)
(unload_dialog dclid)
(vl-file-delete dclname)
)