明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2287|回复: 17

DCL中屏蔽确认键的问题

  [复制链接]
发表于 2005-3-22 10:20:00 | 显示全部楼层 |阅读模式
对话框中,怎么样才能在没有输入内容时,屏蔽确认键呀。
发表于 2005-3-22 10:47:00 | 显示全部楼层
(mode_tile "accept" 1) 
发表于 2005-3-22 11:21:00 | 显示全部楼层
嘿嘿,又学了一招~
 楼主| 发表于 2005-3-22 13:40:00 | 显示全部楼层
楼上的两位,不行呀,怎样才能不全部输入文字框里的内容,就屏蔽确认键呀,我怎么不会??


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2005-3-22 14:40:00 | 显示全部楼层
给你个例子参考 LISP代码: (defun C:BCB (/)
(defun *error* ()
(if old_error(setq *error* old_error)))
(defun BoB (arg)
(if (EQ arg "")
(progn (set_tile "error" "无效输入.") (mode_tile "accept" 1))
(progn (set_tile "error" arg)(mode_tile "accept" 0))
)
)
(setq dcl_id (load_dialog "D:\\DEL2"))
(if (not (new_dialog "BDYCADFaC08K6" dcl_id))(exit))
(action_tile "name" "(BoB (setq name $value))")
(action_tile "nam" "(BoB (setq nam $value))")
(action_tile "O" "(BoB (setq O $value))")
(action_tile "X" "(BoB (setq X $value))")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 2)")
(action_tile "help" "(help \"\")")
(SETQ DD (start_dialog))
(princ)
) DCL代码:
BDYCADFaC08K6 : dialog {
label = "指定位置插入数据"; :column {
:row{
: boxed_column {label = "个人资料﹕";
: edit_box { label = "姓名";key = "name";edit_width = 8;}
: edit_box { label = "性别";key = "nam"; edit_width = 8;}
: edit_box { label = "年龄";key = "O";edit_width = 8;}
: edit_box { label = "血型"; key = "X"; edit_width = 8; }
}} }
spacer_1;
ok_cancel;
}
发表于 2005-3-22 17:19:00 | 显示全部楼层
请问,楼主对话框中的图片是如何插入的,


请赐教
发表于 2005-3-22 17:27:00 | 显示全部楼层
图片是骗你的, 你上当了


你看不出是贴上去的效果吗?
 楼主| 发表于 2005-3-24 08:07:00 | 显示全部楼层
BDYCAD,不好使呀?并不能屏蔽确认呀???
发表于 2005-3-24 09:14:00 | 显示全部楼层
(defun C:BCB (/)
(defun BoB (arg)
(if (/= arg "")
(progn (set_tile "error" arg)(mode_tile "accept" 0))
)
)
(setq dcl_id (load_dialog "tmp"))
(if (not (new_dialog "BDYCADFaC08K6" dcl_id))(exit))
(mode_tile "accept" 1)
(action_tile "name" "(BoB (setq name $value))")
(action_tile "nam" "(BoB (setq nam $value))")
(action_tile "O" "(BoB (setq O $value))")
(action_tile "X" "(BoB (setq X $value))")
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 2)")
(action_tile "help" "(help \"\")")
(SETQ DD (start_dialog))
(princ)
)
发表于 2005-3-24 09:21:00 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-9-29 14:23 , Processed in 0.184269 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表