harrison-matt 发表于 2022-7-6 10:12:24

DCL,单选按钮问题

全部的
 
我想知道是否有可能使盒装单选栏中的单选按钮以一种方式工作,即如果选择一个按钮,它将重置其他按钮。
 
因此,如果我有:

:row
{:boxed_radio_column
{label = "Border";
{:radio_button {key = "SA";label = "S&A Sketch Template";}
{:radio_button {key = "SAI";label = "SA&I Sketch Template";}

 
如果我希望SA处于活动状态,那么我希望SAI处于非活动状态,反之亦然。
 
谢谢
马特

David Bethel 发表于 2022-7-6 10:20:30

我做的有点不同,但在那个场景中应该只有一个主动选择。

: boxed_column {
         label = "Load Vent";
         : radio_column {
            : radio_button {key = "LR-VENT"; label = "Vent"; }
            : radio_button {key = "LR-LOAD"; label = "None"; }
         }

 
????
 
 
-大卫

harrison-matt 发表于 2022-7-6 10:30:05

对不起,我匆匆剪了代码,这一行是:
:row
{:boxed_radio_column
{label = "Border";
:row
{:radio_button {key = "SA";label = "S&A Sketch Template";}
:image {key = "SAlogo";
color = 0;
height = 6;
width = 28;
is_enabled = false;
is_tab_stop = false;}}
:row
{:radio_button {key = "SAI";label = "SA&I Sketch Template";}
:image {key = "SAIlogo";
color = 0;
height = 6;
width = 28;
is_enabled = false;
is_tab_stop = false;}}}}

harrison-matt 发表于 2022-7-6 10:32:38

同样适用于我想按钮是活跃的一次一个。

David Bethel 发表于 2022-7-6 10:37:06

我认为红色括号需要去掉
 

harrison-matt 发表于 2022-7-6 10:43:32

 
括号用于设置按钮右侧幻灯片的格式。他们留下来了。问题不是我做错了什么,而是我如何补充我的程序,当另一个按钮值反向变化时,允许按钮值从1变为0。
 
马特

David Bethel 发表于 2022-7-6 10:52:00

格式正确,radio_列只允许1个选择-大卫
 
http://www.jefferypsanders.com/autolisp_DCL_Part5.html

harrison-matt 发表于 2022-7-6 10:58:38

那么,我该如何将图像保持在方框的左侧,并将其反转,这是一个新的问题!
 
谢谢
马特

David Bethel 发表于 2022-7-6 11:01:18

你有没有看到一个你正在尝试的例子?我不认为图像和单选按钮在单选栏中共存得很好-大卫
 
另一个好资源
 
http://web2.airmail.net/terrycad/Tutorials/MyDialogs.htm

Lee Mac 发表于 2022-7-6 11:11:16

为什么不使用一行两列呢?
 

: boxed_column {

: row {

   : radio_column {

   : radio_button { }
   : radio_button { }

   }

   : column {

   : image { }
   : image { }
   }
}
}
页: [1] 2
查看完整版本: DCL,单选按钮问题