乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 13|回复: 13

[编程交流] DCL文本和方框宽度

[复制链接]

78

主题

207

帖子

129

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
395
发表于 2022-7-6 11:29:22 | 显示全部楼层 |阅读模式
我正在编写一个包含一些文本的对话框。我的问题是,当我查看对话框时,文本右侧有相当大的空间。我试着改变盒子的宽度,但我不能得到那个间隙的rif。如果我把宽度变大,我会看到变化。如果我试着把它缩小,我只会缩小到我的文本宽+那个差距。
 
有人有这个问题吗?
 
第二个问题
 
如果未找到块,则显示此对话框。块名在lisp中设置为变量。
如何在对话框中显示?
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 11:37:58 | 显示全部楼层
给你一个想法:
 
 
  1. : popup_list {
  2. key = "MYKEY";          // Set your key here.
  3. [color=red]width = 18.0;           // Set your width here[/color]
  4. fixed_width = true;     // Set it as fixed width
  5. alignment = centered;   // Center the list
  6. }

 
可以通过更改值来调整宽度的大小。
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 11:42:55 | 显示全部楼层
正如Buzzard所说,最像fixed_width属性。如果您还没有看到AfraLISP,那么它对对话框有很好的演练。
回复

使用道具 举报

78

主题

207

帖子

129

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
395
发表于 2022-7-6 11:44:41 | 显示全部楼层
这是我的密码
 
  1. //DCL CODING STARTS HERE
  2. BLK_INS_ERROR
  3. : dialog {
  4. fixed_width = true;
  5. label = "©2009 test test";
  6. : boxed_column {
  7. label = "BLOCK NOT FOUND";
  8. alignment = centered;
  9. fixed_width = true;
  10. width = 15;
  11. value = 0;
  12. : paragraph {
  13. : text {
  14. label = "test test test test test testtest test test  ";
  15. }
  16. : text {
  17. label = "test tes testtest test test test test test  ";
  18. }
  19. }
  20. : paragraph {
  21. : text {
  22. label = "test test testtest test test test test test ";
  23. }
  24. : text {
  25. label = "test test testtest test test test test test  ";
  26. }
  27. : text {
  28. label = "test test testtest test test test test test ";
  29. }
  30. }
  31. }
  32. : button {
  33. key = "accept";
  34. label = "Cancel";
  35. is_default = true;
  36. fixed_width = true;
  37. alignment = centered;
  38. is_cancel = true;
  39. is_tab_stop = true;
  40. }
  41. }

 
宽度不适合我
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 11:48:19 | 显示全部楼层
您没有识别互动程序的类型,最后缺少}。
 
  1. [color=red]: popup_list {[/color]
  2. label = "BLOCK NOT FOUND";
  3. alignment = centered;
  4. fixed_width = true;
  5. width = 15;
  6. value = 0;
  7. [color=red]}
  8. [/color]
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 11:52:44 | 显示全部楼层
在查看了你的对话框文件后,我不确定你想做什么。
您想要一个列表还是让程序报告回对话框。
我不确定。
 
你能把你的代码贴在上面让我看看发生了什么吗?
 
 
对于您正在尝试执行的操作,一个警报框可能比一个对话框更好。
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 11:57:49 | 显示全部楼层
在我看来,你真正需要的是:
 
显示警报框。
  1. (defun MISSING_BLOCK ()
  2. (alert "BLOCK NOT FOUND!")
  3. (princ))

 
 
或者:
 
打印到命令行。
  1. (defun MISSING_BLOCK ()
  2. (princ "BLOCK NOT FOUND!")
  3. (princ))
回复

使用道具 举报

78

主题

207

帖子

129

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
395
发表于 2022-7-6 12:02:37 | 显示全部楼层
如果我只想显示错误,我会发出警报。但是,此对话框将包含更多信息。并可能显示块的完整路径。
122924cmwb34gwzww3dhab.jpg
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 12:09:28 | 显示全部楼层
好的,我同意你,
但是你也能发布lisp代码吗?
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 12:10:56 | 显示全部楼层
所以你期待着这样的事情:
 
 
  1. BLK_INS_ERROR : dialog {
  2.                label = "©2009 test test";
  3.                : row {
  4.                  : column {
  5.                    : boxed_column {
  6.                      label = "BLOCK NOT FOUND";
  7.                      : paragraph {
  8.                        : text {
  9.                          value = "test test test test test test test test test";
  10.                          fixed_width = true;
  11.                          width = 30;
  12.                        }
  13.                        : text {
  14.                          value = "test test test test test test test test test";
  15.                          fixed_width = true;
  16.                          width = 30;
  17.                        }
  18.                      }
  19.                      : paragraph {
  20.                        : text {
  21.                          value = "test test test test test test test test test";
  22.                          fixed_width = true;
  23.                          width = 30;
  24.                        }
  25.                        : text {
  26.                          value = "test test test test test test test test test";
  27.                          fixed_width = true;
  28.                          width = 30;
  29.                        }
  30.                        : text {
  31.                          value = "test test test test test test test test test";
  32.                          fixed_width = true;
  33.                          width = 30;
  34.                        }
  35.                      }
  36.                    }
  37.                  }
  38.                }
  39.                : button {
  40.                  key = "accept";
  41.                  label = "Cancel";
  42.                  is_default = true;
  43.                  fixed_width = true;
  44.                  alignment = centered;
  45.                  is_cancel = true;
  46.                  is_tab_stop = true;
  47.                }
  48.              }

 
将文本的标签更改为值。
122926nhgtz1gtkl55iih8.jpg
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-6 02:19 , Processed in 0.484035 second(s), 74 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表