DCL文本和方框宽度
我正在编写一个包含一些文本的对话框。我的问题是,当我查看对话框时,文本右侧有相当大的空间。我试着改变盒子的宽度,但我不能得到那个间隙的rif。如果我把宽度变大,我会看到变化。如果我试着把它缩小,我只会缩小到我的文本宽+那个差距。有人有这个问题吗?
第二个问题
如果未找到块,则显示此对话框。块名在lisp中设置为变量。
如何在对话框中显示? 给你一个想法:
: popup_list {
key = "MYKEY"; // Set your key here.
width = 18.0; // Set your width here
fixed_width = true; // Set it as fixed width
alignment = centered; // Center the list
}
可以通过更改值来调整宽度的大小。 正如Buzzard所说,最像fixed_width属性。如果您还没有看到AfraLISP,那么它对对话框有很好的演练。 这是我的密码
//DCL CODING STARTS HERE
BLK_INS_ERROR
: dialog {
fixed_width = true;
label = "©2009 test test";
: boxed_column {
label = "BLOCK NOT FOUND";
alignment = centered;
fixed_width = true;
width = 15;
value = 0;
: paragraph {
: text {
label = "test test test test test testtest test test";
}
: text {
label = "test tes testtest test test test test test";
}
}
: paragraph {
: text {
label = "test test testtest test test test test test ";
}
: text {
label = "test test testtest test test test test test";
}
: text {
label = "test test testtest test test test test test ";
}
}
}
: button {
key = "accept";
label = "Cancel";
is_default = true;
fixed_width = true;
alignment = centered;
is_cancel = true;
is_tab_stop = true;
}
}
宽度不适合我 您没有识别互动程序的类型,最后缺少}。
: popup_list {
label = "BLOCK NOT FOUND";
alignment = centered;
fixed_width = true;
width = 15;
value = 0;
}
在查看了你的对话框文件后,我不确定你想做什么。
您想要一个列表还是让程序报告回对话框。
我不确定。
你能把你的代码贴在上面让我看看发生了什么吗?
对于您正在尝试执行的操作,一个警报框可能比一个对话框更好。 在我看来,你真正需要的是:
显示警报框。
(defun MISSING_BLOCK ()
(alert "BLOCK NOT FOUND!")
(princ))
或者:
打印到命令行。
(defun MISSING_BLOCK ()
(princ "BLOCK NOT FOUND!")
(princ)) 如果我只想显示错误,我会发出警报。但是,此对话框将包含更多信息。并可能显示块的完整路径。
好的,我同意你,
但是你也能发布lisp代码吗? 所以你期待着这样的事情:
BLK_INS_ERROR : dialog {
label = "©2009 test test";
: row {
: column {
: boxed_column {
label = "BLOCK NOT FOUND";
: paragraph {
: text {
value = "test test test test test test test test test";
fixed_width = true;
width = 30;
}
: text {
value = "test test test test test test test test test";
fixed_width = true;
width = 30;
}
}
: paragraph {
: text {
value = "test test test test test test test test test";
fixed_width = true;
width = 30;
}
: text {
value = "test test test test test test test test test";
fixed_width = true;
width = 30;
}
: text {
value = "test test test test test test test test test";
fixed_width = true;
width = 30;
}
}
}
}
}
: button {
key = "accept";
label = "Cancel";
is_default = true;
fixed_width = true;
alignment = centered;
is_cancel = true;
is_tab_stop = true;
}
}
将文本的标签更改为值。
页:
[1]
2