- ;;;;小小修改一下;
- (defun makdcl( lst / file fileid handle )
- (setq file(vl-filename-mktemp nil nil ".dcl")fileid(open file "w"))
- (foreach fstream lst (write-line fstream fileid))
- (close fileid)
- (setq id (load_dialog file))
- (vl-file-delete file)
- id
- )
- ;注意:没写UNLOAD_DIALOG函数,当心[em21]
- 测试:
- (new_dialog "dia7b"
- (makdcl
- '(
- "dia7b:dialog{"
- "label="列表框的专家词库范例";"
- ":list_box{"
- "label="常用词库菜单";"
- "key="klist";width=30;height=10;"
- "fixed_width_font=true; //加入了这一行"
- "}"
- ":edit_box{label="词库";key="wordstr";}"
- "spacer_1;"
- "ok_cancel;"
- "}"
- )
- )
- )
|