明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 867|回复: 0

[基础] 求助高手

[复制链接]
明经网友  发表于 2009-10-23 09:17:00 |阅读模式

kjb:dialog{
            label="空间比计算";          
            :boxed_column{
                        label="数据输入:";
                        :row{
                        :edit_box{
                                 label="室长L(m):";
                                 key="scl";
                                 width=22;
                         }
                        :edit_box{
                                 label="室宽W(m):";
                                 key="skw";
                                 width=22;
                         }
                        :edit_box{
                                 fixed_width=true;
                                 alignment=centered;
                                 key="kjbz";
                                 width=16;
                         }
                       
                        }
                        :row{
                        :edit_box{
                                 label="灯具数量:";
                                 key="djsl";
                                 width=22;
                         }
                        :edit_box{
                                 label="室高H(m):";
                                 key="sgh";
                                 width=22;
                         }
                        :button{
                               label="计算空间比";
                               fixed_width=true;
                               alignment=centered;
                               key="bb1";
                               width=12;
                         }
 
                      }
                 }
          
               spacer_1;
               ok_cancel;
}       

(defun c:kjb()
  (setvar "cmdecho" 0)
  (dcl_1st)
  (prin1)
)
(defun dcl_1st()
   (setq dcl_id(load_dialog "kjb"))
   (new_dialog "kjb" dcl_id)
  (action_tile "bb1" "(get_bb1)(done_dialog 1)")
   (setq dd(start_dialog))
  (if(= dd 1)(action_tile "kjbz" "(setq kjbz $value)(sub_bb1)") 
 )
)
(defun get_bb1()
  (setq sl(atof(get_tile "scl")))
 (setq sw(atof(get_tile "skw")))
 (setq sh(atof(get_tile "sgh")))
)
(defun sub_bb1()
 (set_tile "kjbz" "(/ (* 5 sh (+ sl sw)) (* sl sw))")
)

请问 如何在点击"计算空间比"button控制框不关闭 在"kjbz"edit_box显示 计算结果啊

回复

使用道具

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-6 09:27 , Processed in 0.162603 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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