- UID
 - 64
 
- 积分
 - 1913
 
- 精华
 
- 贡献
 -  
 
- 威望
 -  
 
- 活跃度
 -  
 
- D豆
 -  
 
- 在线时间
 -  小时
 
- 注册时间
 - 2002-1-9
 
- 最后登录
 - 1970-1-1
 
 
 
 
 
 
 | 
 
 
发表于 2005-1-28 02:10:41
|
显示全部楼层
 
 
 
建议你看看doslib,有几种对话框: 
 
dos_checklist        (dos_checklist title message assoc-list)        带开关列表 0表示未选中 
 Example 
  (setq xyz '(("layer1" . 0) ("Layer2" . 0) ("Layer3" . 0))) 
  (dos_checklist "--by陈勇--" "Layers to turn off" xyz) 
-------------------- 
dos_combolist        (dos_combolist title message list [default])    下拉编辑框 
 Example 
  (setq xyz '("layer1" "Layer2" "Layer3")) 
  (dos_combolist "--by陈勇--" "Layer to turn off" xyz) 
-------------------- 
dos_dwgpreview  (dos_dwgpreview title path [T])                 对话框文件列表并预览 
 Example 
  (dos_dwgpreview "Insert a block" "c:\\ blocks\\") 
  (dos_dwgpreview "Insert a block" "c:\\ blocks\\" t) 
 
dos_editbox    (dos_editbox title prompt [default]) 
 多行文字编辑框,可以由外部文本文件导入 
 Example 
 (dos_editbox "Editor--by陈勇--" "输入编辑文字" "Hockey\nis\nthe\nbest!") 
 
-------------------- 
dos_editlist        (dos_editlist title message list)        对话框增减项目并排序 
 Example 
  (setq xyz '("layer1" "Layer2" "Layer3")) 
  (dos_editlist "--by陈勇--" "Layers to create" xyz) 
-------------------- 
dos_getcancel           信息框, 带 CANCEL 钮 
 (dos_getcancel title message) 
 (dos_getcancel T) T== Close the dialog box. 
 (dos_getcancel) 
 Example 
   (setq x 0) 
   (dos_getcancel "Test" "Testing, please wait") ;initialize 
   (while (and (dos_getcancel) (< x 10000)) ;check 
     (setq x (1+ x)) 
   ) 
   (if (= x 10000) 
     (dos_getcancel t) ;close 
   ) 
 
-------------------- 
dos_getcolor   (dos_getcolor title [default])  颜色选择对话框,用RGB颜色值. 
 Example 
 (dos_getcolor "Select a color" 1) 
 
-------------------- 
dos_getint        (dos_getint title message [default])         输入整数 
 Example 
  (dos_getint "--by陈勇--" "Enter number of copies") 
-------------------- 
dos_getpassword                (dos_getpassword title message [default])输入密码 
 Example 
  (dos_getpassword "密码机--by陈勇--" "请您输入密码:" "cy956") 
-------------------- 
dos_getprogress  进程框 
 (dos_getprogress title message maxvalue [T]) 
 (dos_getprogress abs/-rel) 
 (dos_getprogress T) ;close 
 (dos_getprogress) 
 Example 
   (setq x 0 y 1000) 
   (dos_getprogress "Test" "Testing, please wait" y) ;initialize 
   (while (< x y) 
     (dos_getprogress -1) ;increment relative by 1 
     (setq x (1+ x)) 
   ) 
   (dos_getprogress t) ;close 
-------------------- 
dos_getreal        (dos_getreal title message [default])          对话框输入实数 
 Example 
  (dos_getreal "--by陈勇--" "Enter a distance") 
-------------------- 
dos_getstring        (dos_getstring title message [default])        对话框输入字串 
 Example 
   (dos_getstring "--by陈勇--" "输入要查找的函名") 
 
-------------------- 
dos_htmlbox    (dos_htmlbox title address [width height]) 
   显示HTML网页,可定义框大小 
 Example 
 (dos_htmlbox "Autodesk" "www.autodesk.com") 
 (dos_htmlbox "Autodesk" "C:\\dis041128.htm" 2000 1600) 
 
-------------------- 
dos_listbox        (dos_listbox title message list [default])          对话框输入单选表 
 Example 
 (setq xyz '("layer1" "Layer2" "Layer3")) 
 (dos_combolist "--by陈勇--" "Select a layer" xyz "Layer3") 
-------------------- 
dos_multilist          (dos_multilist title message list [indices])        对话框输入多选表 
 (setq xyz '("layer1" "Layer2" "Layer3")) 
 (dos_multilist "--by陈勇--" "Select a layer" xyz) 
 (dos_multilist "--by陈勇--" "Select a layer" xyz '(0 2)) 
-------------------- 
dos_msgbox        (dos_msgbox text title button icon [duration])  信息框 
 button The push button format. The allowable values are as follows: Bit value Description 
        0 Abort, Retry and Ignore 
        1 OK 
        2 OK and Cancel 
        3 Retry and Cancel 
        4 Yes and No 
        5 Yes, No and Cancel 
 icon The icon. The allowable values are as follows:        Bit value Description 
        0 Asterisk        I 
        1 Exclamation   ! 
        2 Hand                X 
        3 Information        I 
        4 Question         ? 
        5 Stop                X 
 返回值: 
        0 Abort 
        1 Cancel 
        2 Ignore 
        3 No 
        4 OK 
        5 Retry 
        6 yes 
 duration=持续时间,button= 1 2 3 5 时用 
 Example 
   (dos_msgbox "--by陈勇--" "Save" 4 3) 
 
-------------------- 
dos_msgboxex (dos_msgboxex "123"  "--by陈勇--"  (list "A" "B" "C" "D") icon) 
最多五个按钮,显示一个提示下的选择 
  icon 
    0 Asterisk      (i) 
    1 Exclamation   (!) 
    2 Hand          (X) 
    3 Information   (i) 
    4 Question      (?) 
    5 Stop          (X) 
 
(setq buttons (list "Sometimes" "Never" "What?")) 
(dos_msgboxex text "Question of the Day" buttons 4) 
 
-------------------- 
///dos_progbar        状态行处出现进程框 
 (dos_progbar label maxvalue) 
 (dos_progbar abs/-rel) 
 (dos_progbar) 
 Example 
   (dos_progbar "Wait..." 10) 
   (dos_progbar –1); move relative to previous location 
   (dos_progbar) 
 
   (setq x 0 y 1000) 
   (dos_progbar "Test" y) ;initialize 
   (while (< x y) 
     (dos_progbar -1) ;increment relative by 1 
     (setq x (1+ x)) 
   ) 
   (dos_progbar) ;close 
-------------------- 
dos_proplist        (dos_proplist title message list)        多组编辑框 
 Example 
  (setq xyz '(("Title" . "Floorplan") ("Project" . "Project A"))) 
  (dos_proplist "--by陈勇--" "Modify Properties" xyz) 
-------------------- 
dos_splash        (dos_splash filename duration)  屏显256色bmp图形 
 Example 
   (dos_splash "mylogo.bmp" 5) 
-------------------- 
dos_waitcursor        (dos_waitcursor [T])  改变鼠标指针 
 Options 
   T Toggles on the  沙漏指针. 
 Examples 
  (dos_waitcursor T) 
  (dos_waitcursor) 
---------------------------------------- 
*dos_getfiled, (dos_getfiled title path filter) 对话框取文件 
 (dos_getfiled "选择文件" "c:\\program files\\autocad 2002\\" "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||") 
-------------------- 
dos_getfilem        (dos_getfilem title path filter) 多选文件对话框!!! 
 Example 
 (dos_getfilem "Select Drawings" "C:\\ DRAWINGS\\" "Drawing Files (*.DWG)|*.DWG") 
   ("C:\\ DRAWINGS\\" "TITLE1.DWG" "TITLE2.DWG"...) 
 (dos_getfilem "Select Files" "C:\\ FILES\\" "Text Files  (*.TXT)|*.TXT|All Files (*.*)|*.*") 
   ("C:\\ FILES\\" "TITLE1.TXT" "TITLE2.TXT"...) 
======================================== 
dos_getdir        dos_getdir   (dos_getdir title [path])浏览器选择目录 
Example 
 (dos_getdir "Select a Directory" "c:\\")        "C:\\ DRAWINGS\\ PROJECTS\\" |   
 
 
 
 |