明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6843|回复: 11

[经验] DCL对话框控件属性一览表

[复制链接]
发表于 2019-3-12 22:57:09 | 显示全部楼层 |阅读模式
本帖最后由 1291500406 于 2019-3-17 21:44 编辑

属性
释义及常用值
相关控件
action
链接一个LISP函数,
响应鼠标或键盘动作
button,edit_box,image,image_button,list_box,
popup_list,radio_button,slider,toggle
alignment
控件布局,值:left,centered,right,
top,centered,bottom
所有控件
allow_accept
控件是否相应ENTER键,值:true,false
edit_box,image_button,list_box
aspect_radio
控制控件的宽高比
image,image_button
big_increment
滑动条最大步进值
slider
childre_alignment
容器里控件内部控件布局
boxed_column,boxed_radio_column,boxed_radio_row,
boxed_row,column,radio_column,radio_row,row
child_fixed_height
全部控件
child_fixed_width
全部控件
color
图像、背景、矢量快的颜色
image,imange_button
edit_limit
编辑框最大允许字符数,默认值132
edit_box
edit_width
编辑框宽度
edit_box,popup_list
fixed_height
全部控件
fixed_width
全部控件
fixed_width_font
列距和行距不变
情况下调整字符间距
list_box,popup_list
height
控件最小高度
全部控件
initial_focus
确定对话框内被聚焦的控件
dialog
is_bold
字体是否粗体显示
text
is_cancel
是否相应ESC按键
button
is_default
是否相应ENTER按键
button
is_enabled
控件是否有效
button,edit_box,iamge,image_button,
list_box,popup_list,radio_button,toggle
is_tab_stop
控件是否接受TAB聚焦
button,edit_box,iamge,image_button,list_box,
popup_list,radio_button,toggle
key
控件关键字
button,edit_box,iamge,image_button,list_box,
popup_list,radio_button,slider,text,toggle
label
控件标签
boxed_column,boxed_radio_column,boxed_radio_row,
boxed_row,button,dialog,edit_box,list_box,

popup_list,radio_button,slider,text,text_part,toggle

layout
slider控件的方向
slider
list
初始值
list_box,popup_list
max_value
slider最大值
slider
min_value
slider最小值
slider
mnemonic
控件助记符
button,edit_box,image,list_box,
popup_list,radio_button,slider,toggle
multiple_select
可否多选
list_box
password_char
用户输入屏蔽字符
edit_box
small_increment
slider控件最小步进值
slider
tabs
list_box,popup_list
tab_truncate
list_box,popup_list
value
初始值
dialog,edit_box,imange,list_box,
popup_list,radio_button,slider,text,toggle
width
控件最小宽度
全部控件
常用预定义控件包括ok_only,ok_cancel,errtile,ok_cancel_help,ok_cancel_help_errtile,ok_cancel_help_info






































例子:

bb:dialog{ }


:spacer
{ }
:text
{ }
:text_part
{ }
:edit_box
{ }
:button
{ }
:toggle
{ }
:radio_button
{ }
: slider
{ }
:popup_list
{ }
:list_box
{ }
:image
{ }
:image_button
{ }

ok_only;
ok_button;
help_button;
cancel_button;
info_button;
ok_cancel;
ok_cancel_help;
ok_cancel_help_info;
ok_cancel_help_errtile;

:row
{ }
:column
{ }
:boxed_column
{ }
:boxed_row
{ }
:boxed_radio_row
{ }
:boxed_radio_column
{ }
:concatenation
{ }

spacer_1;
edit_width = 1;
errtile;
width = 1;
height = 1;
fixed_height = true ;
fixed_width = true ;
fixed_width_font=true;
horizontal_margin = none;
vertical_margin = none;
label = 必强MP3;
key =bb;
color = -15 ;
aspect_ratio = 1 ;
alignment=left;
alignment=right;
alignment=centered;
is_cancel = true;
allow_accept = true;
value=50;
min_value = 1;
max_value = 100;
small_increment = 1;
big_increment = 1;
layout=vertical;





文字组码
组码
说明
100
子类标记 (AcDbText)
39
厚度(可选;默认值 = 0)
10
第一对齐点(在 OCS 中)
DXF:X 值;APP:三维点
20, 30
DXF:第一对齐点的 Y 值和 Z 值(在 OCS 中)
40
文字高度
1
默认值(字符串本身)
50
文字旋转角度(可选;默认值 = 0)
41
X 相对缩放比例宽度(可选;默认值 = 1)
使用拟合类型的文字时,该值也将进行调整。
51
倾斜角(可选;默认值 = 0)
7
文字样式名(可选;默认值 = 标准)
71
文字生成标志(可选;默认值 = 0):
2 = 文字反向(在 X 轴方向镜像)
4 = 文字倒置(在 Y 轴方向镜像)
72
文字水平对正类型(可选;默认值 = 0)整数代码(非按位编码)
0 = 左对正;1 = 居中对正;2 = 右对正
3 = 对齐(如果垂直对齐 = 0)
4 = 中间(如果垂直对齐 = 0)
5 = 拟合(如果垂直对齐 = 0)
详细信息请参见组 72 和 73 整数代码表
11
第二对齐点(在 OCS 中)(可选)
DXF:X 值;APP:三维点
只有当 72 或 73 组的值非零时,该值才有意义(如果对正不是基线对正/左对正)
21, 31
DXF:第二对齐点的 Y 值和 Z 值(在 OCS 中)(可选)
210
拉伸方向(可选;默认值 = 0, 0, 1)
DXF:X 值;APP:三维矢量
220, 230
DXF:拉伸方向的 Y 值和 Z 值(可选)
100
子类标记 (AcDbText)
73
文字垂直对正类型(可选;默认值 = 0):整数代码(非按位编码):
0 = 基线对正;1 = 底端对正;2 = 居中对正;3 = 顶端对正
详细信息请参见组 72 和 73 整数代码表

下表详细说明了组码 72(水平对齐)和组码 73(垂直对齐)。
组 72 和 73 整数代码
组 73
组 72
0

1

2

3

4

5
3(顶端对正)
左上
中上
右上


2(居中对正)
左中
正中
右中


1(底端对正)
左下
中下
右下


0(基线对正)
中心
对齐
中间
拟合

(if (and (= (cdr (assoc 72 ent)) 0) (= (cdr (assoc 73 ent)) 0) )
(entmod (setq ent (subst(cons 10 pt)(assoc 10 ent)ent)))
(entmod (setq ent (subst(cons 11 pt)(assoc 11 ent)ent))))



点评

基本没用  发表于 2019-3-15 20:58
"觉得好,就打赏"
还没有人打赏,支持一下
 楼主| 发表于 2019-3-15 21:14:55 | 显示全部楼层
这个是写对话框必备的属性表,怎么会没用
发表于 2019-4-29 01:01:50 | 显示全部楼层
学习了  我用DCL做窗口还是很有用的
发表于 2019-6-16 22:39:47 | 显示全部楼层
怎样调整列表list_box的行矩
发表于 2019-12-18 10:20:49 | 显示全部楼层
极好的学习了
发表于 2019-12-18 23:37:26 来自手机 | 显示全部楼层
谢谢楼主分享
发表于 2020-9-29 20:13:32 | 显示全部楼层
lifuq1979 发表于 2019-6-16 22:39
怎样调整列表list_box的行矩

我是加空行(空字符串),用一个函数控制点击空行无效就行
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-17 11:37 , Processed in 0.208993 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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