本帖最后由 1291500406 于 2020-12-21 09:56 编辑
http://bbs.mjtd.com/thread-179119-1-1.html
-容器控件-
dialog (对话框)
Initial_focus=
对话框起始 key 值
Value =
DCL 对象的默认值
Children_alignment=
群集内各子对象的对齐方式
Children_fixed_heigh =
群集内各子对象的高度值
Children_fixed_width =
群集内各子对象的宽度值
Heigh=
DCL 对象高度
Key=
Label =
DCL 对象标签文字
Width=
DCL 对象宽度
boxed_column
(框列)
boxed_row
(框行)
boxed_radio_row(单选钮框行)
boxed_radio_column(单选钮框列)
Column
(直列)
row
(横行)
radio_row
(单选钮行)
radio_column
(单选钮列)
concatenation(水平群集连接)
paragraph
(垂直群集连接)
Children_alignment=
群集内各子对象的对齐方式
Children_fixed_heigh =
群集内各子对象的高度值
Children_fixed_width =
群集内各子对象的宽度值
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Key=
Label =
DCL 对象标签文字
Width=
DCL 对象宽度-独立控件-
Button(按钮)
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
Fixed_heigh=
DCL 对象配置过程中高度值不变
Fixed_width=
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_cancel=
指定取消动作发生时(esc 或 ctrl+c)此按键是否一起作用
Is_default =
指定 enter 发生时,此按键是否一起作用
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象
Key=
Label =
DCL 对象标签文字
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Width=
DCL 对象宽度
Edit_box(编辑框) edit12_box edit32_box fcf_ebox fcf_ebox1
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
allow_accept =
同时激活 is_default
Edit_limit=
限制编辑框最大的输入字符
Edit_width=
对象的编辑或输入区宽度
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象
Key=
Label=
DCL 对象标签文字
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Width =
DCL 对象宽度
Password_char =
指定在 edit_box 编辑框内密码显示字符
Image(图像) image_block
Image_button(图像钮) icon_image swatch fcf_ibut fcf_ibut1
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
Aspect_ratio=
图像高度/宽度比值
Color =
图像对象的背景颜色
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象
Key=
Label=
DCL 对象标签文字mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Width =
DCL 对象宽度
Iist_box(列式选单)
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
allow_accept =
同时激活 is_default
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Fixed_width_font =
以固定间距显示字体
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象
Key=
Label=
DCL 对象标签文字
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Multiple_select=
控制在 list_box 显示选单中能否做多重选择
Tabs =
指定选单中的 tab 定位点
Tabs_truncate=
截掉超过 tab 定位点的字符串
value=
DCL 对象的默认值
Width =
DCL 对象宽度
Popup_list(下拉选单)
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
Edit_width=
对象的编辑或输入区宽度
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Fixed_width_font =
以固定间距显示字体
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象
Key=
Label=
DCL 对象标签文字
List =
默认选单内容,字符串间可以加入
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Tabs =
指定选单中的 tab 定位点
Tabs_truncate=
截掉超过 tab 定位点的字符串
value=
DCL 对象的默认值
Width =
DCL 对象宽度
Radio_button(单选钮)
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象Key=
Label=
DCL 对象标签文字
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
value=
DCL 对象的默认值
Width =
DCL 对象宽度
Slider(滑杆)
action=
对话框起始 key 值
alignment=
指定群集的水平或垂直对齐方式
Big_increment=
滑杆框内移动的单位量
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Key=
Label=
DCL 对象标签文字
Layout=
控制滑杆方向
Max_value=
滑杆最大值
Min_value =
滑杆最小值
mnemonic=
指定作用 DCL 对象的键盘快速记忆字符
Small_increment =
滑杆框外箭头移动的单位量
value=
DCL 对象的默认值
Width =
DCL 对象宽度
Spacer(空白栏)
alignment=
指定群集的水平或垂直对齐方式
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Value =
DCL 对象的默认值
Width =
DCL 对象宽度
Text(文字) text_part(文字组成) text_25
alignment=
指定群集的水平或垂直对齐方式
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_bold=
是否以粗体显示文字
Key=
Label=
DCL 对象标签文字
Value =
DCL 对象的默认值
Width =
DCL 对象宽度
Toggle(切换开关)
alignment=
指定群集的水平或垂直对齐方式
Fixed_height =
DCL 对象配置过程中高度值不变
Fixed_ width =
DCL 对象配置过程中宽度值不变
Height =
DCL 对象高度
Is_enabled=
DCL 对象初选时,是否属于可作用选取状(mode_tile)
Is_tab_stop =
控制 DCL 作用对象,是否为 Tab 切换停驻对象Key=
Label=
DCL 对象标签文字
Value =
DCL 对象的默认值
Width =
DCL 对象宽度
-标准控件-
Cancel_button
Errtile (错误信息)
Help_button
Info_button
Ok_cancel (确定 取消)
Ok_cancel_help (确定 取消 说明)
Ok_cancel_help_errtile (确定 取消 说明 错误)
Ok_cancel_help_info (确定 取消 说明 信息)
Ok_only (确定)
Spacer (空白栏)
Spacer_0 (空白栏<高宽=0>)
Spacer_1 (空白栏<高宽=1>)
-颜色控件-
Color_palette_1_7
Color_palette_1_9
Color_palette_0_9
Color_palette_250_250
Std_rq_color
(defun c:bb ( / Dcl_File file dcl_id )
(setq Dcl_File (vl-filename-mktemp nil nil ".Dcl")file (open Dcl_File "w") )
(write-line
"bbimage:dialog {
:toggle {label =\"这是toggle标题\" ; key = \"bbtoggle\" ; value = 1; }
:button {label =\"cancel\" ; key = \"cancel\" ;is_cancel = true;}
}" file)
(close file)(setq dcl_id (load_dialog Dcl_File ))(vl-file-delete Dcl_File)(new_dialog "bbimage" dcl_id)
(alert(if(=(get_tile "bbtoggle")"1") "当前已选定" "当前未选定"))
(action_tile "bbtoggle" "(alert(if(= $value \"0\")\"当前未选定\"\"当前已选定\"))")
(start_dialog))
(defun bb-dcl-image (s dclw dclh til ti tt x y x++ f yy col / Dcl_File file dcl_id )
(setq Dcl_File (vl-filename-mktemp nil nil ".Dcl")file (open Dcl_File "w") )
(write-line (strcat "bbimage:dialog {label = \"" til "\";
:image { color = -15 ; height =" dclh " ; width = " dclw "; key = \"bblogo\" ; }
:button {label =\"" ti "\" ; key = \"cancel\" ;is_cancel = true;}}") file)
(close file)(setq dcl_id (load_dialog Dcl_File ))(vl-file-delete Dcl_File)(new_dialog "bbimage" dcl_id)
(repeat tt(start_image "bblogo")
(setq y (1+ y))
(setq x (+ x x++))
(fill_image y (fix(+ (* (eval s)f)yy)) 1 1 col)(end_image))
(start_dialog)(princ))
(bb-dcl-image '(if(>(cos x )0)(cos x )0) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(sin x ) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(abs(sin x )) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(cos x ) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(abs(cos x )) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(/(sin x )(cos x )) "180" "5" "必强""关闭" 1500 0 -1 0.2 20 20 1)
(bb-dcl-image '(expt x 2) "180" "50" "必强""关闭" 1500 -50 -1 0.1 10 10 1)
(bb-dcl-image '(log x) "180" "30" "必强" "关闭" 1500 0 -1 0.1 30 50 1)
(bb-dcl-image '(exp x) "180" "30" "必强" "关闭" 150 0 50 0.01 30 0 1)
(bb-dcl-image '(abs x) "180" "30" "必强" "关闭" 1500 0 50 0.01 30 0 1)
(bb-dcl-image '(+(* x 2)1) "180" "30" "必强" "关闭" 1500 0 50 0.01 30 0 1)
(bb-dcl-image '(+(* x x )1) "180" "30" "必强" "关闭" 1500 -50 -1 0.1 10 10 1)
;随机数测试
(defun bb-rnd-for-js ( bmin bmax)
(setq ScriptControl (vlax-create-object "{e8540e26-d20e-483f-9fd5-a5a3553a7556}"))
(setq ScriptControl (vlax-create-object "{0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc}"))
(vl-catch-all-apply 'vlax-put (list ScriptControl "language" "jscript"))
(vl-catch-all-apply ' vlax-invoke (list ScriptControl "eval" (strcat "Math.floor(Math.random()*" (rtos (- bmax bmin) 2 0) ")+" (rtos bmin 2 0) ";"))
(bb-dcl-image '(bb-rnd-for-js 0 100) "180" "60" "必强" "关闭" 1500 0 -1 0.1 30 50 1)
(defun c:bb ( / Dcl_File file dcl_id )
(setq Dcl_File (vl-filename-mktemp nil nil ".Dcl")file (open Dcl_File "w") )
(write-line
"bbimage:dialog {
:toggle {label =\"这是toggle标题\" ; key = \"bbtoggle\" ; value = 1; }
:button {label =\"cancel\" ; key = \"cancel\" ;is_cancel = true;}
}" file)
(close file)(setq dcl_id (load_dialog Dcl_File ))(vl-file-delete Dcl_File)(new_dialog "bbimage" dcl_id)
(alert(if(=(get_tile "bbtoggle")"1") "当前已选定" "当前未选定"))
(action_tile "bbtoggle" "(alert(if(= $value \"0\")\"当前未选定\"\"当前已选定\"))")
(start_dialog))
|