明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1278|回复: 6

請教如何編程才能實現多重對話框?

[复制链接]
发表于 2007-3-20 15:20 | 显示全部楼层 |阅读模式

在一個對話框裡點擊命令後怎樣才能彈出來另一個對話框,而當前的對話框仍在。如何實現多重對話框?用什麼函數?

請教高手。

发表于 2007-3-20 18:35 | 显示全部楼层
好像dcl不行.试试vb,vba,arx,等
发表于 2007-3-20 18:54 | 显示全部楼层
本帖最后由 作者 于 2007-3-20 20:01:29 编辑

可以的

(defun C:testdcl()
  (setq what_next 2)
    (Setq dcl_id (Load_Dialog "test.dcl"))
  (WHILE (<= 2 what_next)
    (if (null (new_dialog "DCL1" dcl_id)) ;Initialize dialog
      (exit) ;box, exit if nil
    ) ; endif
    (action_tile "Show2" "(done_dialog (ShowDialog2))")
    (action_tile "accept" "(done_dialog 1)")
    (action_tile "cancel" "(done_dialog 0)")
    (setq what_next (start_dialog))
  )
    (unload_dialog dcl_id)
 )

(defun ShowDialog2()
      (if (null (new_dialog "DCL2" dcl_id)) ;Initialize dialog
      (exit) ;box, exit if nil
    ) ; endif
    (action_tile "HideMe" "(HideMe)")
    (action_tile "accept" "(done_dialog 1)")
    (action_tile "cancel" "(done_dialog 0)")
    (start_dialog)
)

(defun HideMe()
  (done_dialog 3)
)

DCL1: dialog {
 label = "Dialog Box 1";
 : edit_box { label = "Input"; key = "input1"; edit_width = 10;}
 spacer;
 : row {
   : button { label = "Show Dialog 2"; key = "Show2";}
   ok_cancel;
   }
   }
 DCL2: dialog {
 label = "Dialog Box 2";
 : edit_box { label = "Input"; key = "input2"; edit_width = 10;}
 spacer;
 : row {
 : button { label = "Hide Me"; key = "HideMe";}
 ok_cancel;
 }
 }

 楼主| 发表于 2007-3-21 09:51 | 显示全部楼层

謝謝兩位版主,明白了,在DCL裡可以做嵌套對話框,但不可以有多個活動對話框,必須關閉了嵌套子對話框後才能對上一層對話框操作。

发表于 2007-3-21 11:43 | 显示全部楼层
嵌套對話框,可以隐藏,也可以不隐藏,但必须先处理当前对话框,才能回到上一层对话框.
发表于 2007-4-24 00:43 | 显示全部楼层
如何在第二个对话框显示的时候隐藏掉第一个对话框?刚才试了几次,都导致直接当机了。
发表于 2007-5-18 17:35 | 显示全部楼层
也就是说在子对话框中的计算的数据怎么才能同时显示到主对话框中 ,这个问题我想来好长时间都不行  希望帮帮忙 谢谢·!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-25 22:34 , Processed in 0.219480 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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