调整
大家好。是否可以将对话框的外观调整为各方面都相等?
下面的对话框需要将文本“X”调整到中间,将按钮“确定”和“取消”调整到相同大小。
strings: dialog {
label = "Window Selection ";
:column {
:boxed_row {label = "Strings ...";
:column {
:row { : text { value = "Width"; }
: text { value = "X"; }
: text { value = "Height"; }
}
:row {
: popup_list { key = "l1"; width = 10; }
: popup_list { key = "l2"; width = 10; }
}
}
}
:row {
: button { key = "accept"; label = "OK"; fixed_width = false; is_default = true; is_cancel = true; allow_accept =true; }
: button { key = "cancel"; label = " Cancel "; fixed_width = false; is_default = false; is_cancel = true;}
}
}
}
可以通过宽度和高度属性控制对话框的大小;宽度也适用于按钮和标签。
可以使用间隔瓷砖来调整其他瓷砖的位置。
is\u default和is\u cancel属性分别控制按钮按下时的行为;默认情况下,两者都设置为false。每个对话框定义的这些属性必须是唯一的。将allow\u accept添加到OK按钮也是一种无稽之谈——你要求它自己触发。 我会用这样的东西:
mytext : text { fixed_width = true; alignment = centered; }
mybutt : button { fixed_width = true; alignment = centered; width = 12; }
strings: dialog
{
label = "Window Selection";
: boxed_column
{
label = "Strings";
: row
{
: column
{
: mytext { label = "Width"; }
: popup_list { key = "l1"; width = 15; fixed_width = true; }
}
: column
{
: mytext { label = "X"; }
}
: column
{
: mytext { label = "Height"; }
: popup_list { key = "l2"; width = 15; fixed_width = true; }
}
}
spacer;
}
: row
{
fixed_width = true;
alignment = centered;
: mybutt { key = "accept"; label = "OK"; is_default = true; }
: mybutt { key = "cancel"; label = "Cancel";is_cancel = true;}
}
} Waww。。。两者都很棒
非常感谢先生们。 大家好。
如何使用Dcl代码的编辑格式窗口?
谢谢 恐怕这个功能只适用于AutoLISP代码。帮助摘录: 你好
我正在处理另一个对话框,我觉得宽度的值根本不符合逻辑,那么它们是如何工作的呢?
谢谢
你觉得他们不符合逻辑吗?更大的宽度值将导致更宽的平铺-对我来说似乎足够合理 嗨,李。
实际上,当我更改任何按钮、弹出列表或编辑框的宽度值时,我在对话框上看不到任何更改,下面是一个示例。
3
谢谢 宽度值必须足够大,以适应按钮标签的大小,此外,fixed_width属性必须设置为true,否则平铺将扩展以填充可用区域。
可能已经阅读了AfraLISP上的一些DCL教程,以及Visual LISP IDE帮助文档中的DCL指南;两者都为对话设计和互动行为提供了有价值的见解。
页:
[1]