DCL,单选按钮/切换按钮,但
你好几天来,我与DCL和Lisp一起工作,并产生了一些疑问:
1-单选按钮:
1.1-有没有办法在当前选中的单选按钮的数字“x”之间进行检查?
1.2-为了运行代码并选择第一个项目,我在DCL文件上使用:is_enabled=true(它只在该项目上放置一个点,但不在那里单击选择它,换句话说,只显示一个点图像)。在我编写的lisp代码中,我试图执行一个动作:(set_tile“rb1”1),但不起作用,与单击那里的方式不同。
2-toggle_按钮。
2.1-第一次按下切换按钮时(在被选择之前),切换按钮可以执行动作,可以“取消选择”执行一个动作吗?
例如:当我选择切换时,我显示一个图像,但当我取消选择时,图像需要更改,有什么方法吗?
提前感谢您的帮助!。。。 只是一段代码:
(action_tile“tg\u ct\u matchtextcase”“(setq#matchtextcase$value)”)
(action_tile“rb\u ct\u range\u e”“(setq#useextends$value)(ct\u SelectRange\u e)”)
(action_tile“rb\u ct\u range\u w”“(setq#usevent$value)(ct\u SelectRange\u w)”)
第一行是关于切换的,我只知道$value。如果你想开始一个动作,你必须添加一个对另一个例程的调用,或者用done\u对话框关闭你的对话框。
其他2行用于单选按钮。每个单选按钮都有自己的唯一名称。我的变量#useextends可以是“1”或“0”。捕捉到这个值后,程序将转到另一个例程(在我的示例中是CT\u SelectRange\u e),供您使用自己的例程。在那里,你可以做任何你喜欢的事,开始程序的另一部分,更新幻灯片。。。
您可以使用done\u dialog离开当前对话框,并根据done\u dialog返回值执行其他操作。。。(完成对话框5)例如
通常(完成对话框1)表示确定,(完成对话框0)表示取消
无论如何,你可以通过再次启动来刷新你的对话框,或者有一个单独的例程来这样做,(update\u my\u dialog),在那里你可以在真正启动对话框之前预先设置每个切换、单选按钮
gr.R。
顺便说一句(set\u tile“rb1”1)不起作用,请使用(set\u tile“rb1”1)
感谢快速回答rlx!。。。我正在努力理解并应用它!。。。
也没有预期的结果。。。
如:
对不起,旧的,有时糟糕的编码,但我需要一些快速和简单的你知道。。。也许这些文件可以帮助你
一个例程我过去用来在我的图纸上放置日期戳,另一个例程我现在仍然用来放大图纸或图像。
gr.R
日期戳。dcl
日期戳。lsp
ScaleDwg。dcl
ScaleDwg。LSP
别担心,rlx!欢迎任何帮助!。。。我会查的!!!。。。再次感谢!。。。 要么您将单选按钮分组并以错误的方式切换到一起,要么您必须查看“mode\u tile”功能,该功能使您能够控制启用或禁用(单选)按钮或切换。
我想不会。。。我检查了结构代码,并在一些不同的地方编写了它进行测试,什么都没有。。。我不知道,但set\u互动程序不仅仅与action\u互动程序一起工作?。。。 你好
坦率地说,我没有理解你的观点,所以你能用代码直接解释你的疑虑吗?
谢谢你的提问。。。我试图了解一些函数是如何工作的,或者是否有一种替代方法。我只在另一个线程中做,不混合的问题。
还记得你帮我的那根线吗?(细节)
有9个toggle_按钮,因为它们一起工作,有如何获得当前选择哪一个?例如:rbx返回选中的单选按钮数。。。rb1、rb2或rb9。
DCL:
Deti : dialog { //dialog name
label = "Detalhamento de instalação" ; //give it a label
: row { //*define row
:boxed_radio_column { //define radio column
label = "Ti&po:" ; //give it a label
: radio_button { //define radion button
key = "rb1" ; //give it a name
label = "&C" ; //give it a label
value = "1" ; //switch it on
is_enabled = true ;
} //end definition
: radio_button { //define radio button
key = "rb2" ; //give it a name
label = "&E" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb3" ; //give it a name
label = "&X" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb4" ; //give it a name
label = "L&B" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb5" ; //give it a name
label = "L&L" ; //give it a label
} //end definition
: radio_button { //define radio button
key = "rb6" ; //give it a name
label = "L&R" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb7" ; //give it a name
label = "&T" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb8" ; //give it a name
label = "BR" ; //give it a label
} //end definition
: radio_button { //define radion button
key = "rb9" ; //give it a name
label = "LUR" ; //give it a label
} //end definition
: boxed_row {
label = "Sobe / Desce" ;
:toggle {
alignment = centered ;
label = "&Sobe" ;
key = "tog1" ;
value = "0" ;
}
:toggle {
alignment = centered ;
label = "&Desce" ;
key = "tog2" ;
value = "0" ;
}
}
} //end radio column
: boxed_column { //*define boxed column
label = "Bitol&a" ; //*give it a label
: popup_list { //*define popup list
alignment = centered;
key = "Bitolas" ; //*give it a name
value = "1" ; //*initial value
} //*end list
:image {height = 3; width = 0;aspect_ratio=0.8;color=0;fixed_height=true;key = "img";}
} //*end boxed column
} //*end row
ok_cancel ; //predifined OK/Cancel
: row { //define row
: image { //define image tile
key = "im" ; //give it a name
height = 1.0 ; //and a height
width = 2.0 ; //and now a width
} //end image
: paragraph { //define paragraph
: text_part { //define text
label = "Elaborado por:" ; //give it some text
} //end text
: text_part { //define more text
label = "José Roberto dos Santos Junior."; //some more text - Credits to Kenny Ramage
} //end text
} //end paragraph
} //end row
} //end dialog
要启动该代码(Deti),如果您没有选择任何单选按钮获取一个错误,这两个操作都不起作用:
DCL:is_enabled-仅用点图像填充单选按钮;
LISP:(set_tile“rb1”“1”)-什么也不做。
如果可能的话,我试图“强制”代码选择第一个单选按钮作为之前的选择。
页:
[1]
2