明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1608|回复: 7

[讨论] 如何制作部分隐藏的对话框

[复制链接]
发表于 2014-12-4 09:08:41 | 显示全部楼层 |阅读模式
就是制作一个对话框,使对话框的右边部分隐藏,隐藏部分和非隐藏部分有一个类似剪头的东西,点击它,隐藏部分显示,再点击它又隐藏。请各位高手支招。

点评

放弃DCL,使用强大的OpenDCL,可以很容易满足你各种需求!  发表于 2014-12-4 16:04
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2014-12-4 14:01:49 | 显示全部楼层
本帖最后由 wzg356 于 2014-12-4 14:13 编辑

做成2个对话框(一般也是这样处理),你说的箭头是一个button用于切换,点击button执行另一个对话框的启动指令。
另一个对话框同样做一个button用于切换回来。
 楼主| 发表于 2014-12-4 16:46:53 | 显示全部楼层
请教各位,opendcl是不是要安装什么程序啊?

点评

安装opendcl  发表于 2014-12-4 16:58
发表于 2014-12-5 23:06:11 | 显示全部楼层
DCL也能实现...



本帖子中包含更多资源

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

x
 楼主| 发表于 2014-12-6 08:46:11 | 显示全部楼层
sicky111 发表于 2014-12-5 23:06
DCL也能实现...

不错就是这样的,怎么实现的大神
发表于 2014-12-10 23:46:16 | 显示全部楼层
期待高手解决此事哦
发表于 2014-12-11 01:48:27 | 显示全部楼层
dcl我觉得只能用老土办法了,做两个或三个对话框解决,互相切换,没技术含量
看得上的拿去
  1. ;;;隐框示例
  2. (defun c:tt1 ( / dcl_id dd p str_h)
  3.   (setq dcl_id (load_dialog (wwcc1-dcl)))
  4.   (new_dialog "wwcc1" dcl_id)
  5.   (action_tile "key1" "(done_dialog 1)")
  6.   (action_tile "key2" "(done_dialog 2)")
  7.   (setq dd (start_dialog))
  8.   (cond
  9.     ((= dd 1) (alert "执行你的程序!"))
  10.     ((= dd 2) (c:tt2))  
  11.   )
  12.   (princ)
  13. )

  14. (defun c:tt2 ( / dcl_id dd p str_h)
  15.   (setq dcl_id (load_dialog (wwcc2-dcl)))
  16.   (new_dialog "wwcc2" dcl_id)
  17.   (action_tile "key1" "(done_dialog 1)")
  18.   (action_tile "key2" "(done_dialog 2)")
  19.   (setq dd (start_dialog))
  20.   (cond
  21.     ((= dd 1) (alert "执行你的程序!"))
  22.     ((= dd 2) (c:tt1))  
  23.   )
  24.   (princ)
  25. )
  26. ;;;=============================
  27. ;;写对话框1
  28. (defun wwcc1-dcl  (/ lst_str str file f)
  29.     (setq lst_str '(
  30. ""
  31. "wwcc1:dialog {"
  32. "    label = "第一窗" ;"
  33. "    :boxed_row {"
  34. "        :text {"
  35. "            label = "哈喽!" ;"
  36. "        }"
  37. "    }"
  38. "    :button {"
  39. "        key = "key1" ;"
  40. "        label = "命令1" ;"
  41. "    }"
  42. "    :button {"
  43. "        key = "key2" ;"
  44. "        label = "第二窗>>&C" ;"
  45. "    }"
  46. "    :spacer {}"
  47. "    cancel_button;"
  48. "}"
  49.         )
  50.     )
  51.     (setq file (vl-filename-mktemp "DclTemp.dcl"))
  52.     (setq f (open file "w"))
  53.     (foreach str lst_str
  54.   (princ "\n" f)
  55.   (princ str f)
  56.     )
  57.     (close f)
  58.     ;;返回
  59.     file
  60. )

  61. ;;写对话框2
  62. (defun wwcc2-dcl  (/ lst_str str file f)
  63.     (setq lst_str '(
  64. ""
  65. "wwcc2:dialog {"
  66. "    label = "第二窗" ;"
  67. "    :boxed_row {"
  68. "        :text {"
  69. "            label = "哈喽!" ;"
  70. "        }"
  71. "    }"
  72. "    :button {"
  73. "        key = "key1" ;"
  74. "        label = "命令1" ;"
  75. "    }"
  76. "    :boxed_row {"
  77. "        :text {"
  78. "            label = "没有东东" ;"
  79. "        }"
  80. "    }"
  81. "    :button {"
  82. "        key = "key2" ;"
  83. "        label = "<<第一窗&C" ;"
  84. "    }"
  85. "    :spacer {}"
  86. "    cancel_button;"
  87. "}"
  88.         )
  89.     )
  90.     (setq file (vl-filename-mktemp "DclTemp.dcl"))
  91.     (setq f (open file "w"))
  92.     (foreach str lst_str
  93.   (princ "\n" f)
  94.   (princ str f)
  95.     )
  96.     (close f)
  97.     ;;返回
  98.     file
  99. )
  100. ;;;=================================================================*
  101. (princ)
发表于 2018-5-6 18:37:00 来自手机 | 显示全部楼层
做两个dcl,来回切换
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-19 17:21 , Processed in 0.240704 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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