Jump to content

DCL, Radio Buttons question


Recommended Posts

Posted

All,

 

I am wondering if it is possible to make the radio buttons in a boxed radio column act in a fashion that if one button is selected it would reset the other buttons.

 

So, if i have:

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

 

If i want SA to be active then I would want SAI to be inactive and viseversa.

 

Thanks,

Matt

Posted

I do it a bit differently but there should only be 1 active choice in that scenario.

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

 

????

 

 

-David

warewash.jpg

Posted

Sorry, i clipped my code in a hurry here is that row:

: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;}}}}

Posted

The same applies I would like the buttons to be active one at a time.

Posted

I think brackets in red need to go away

 

Sorry, i clipped my code in a hurry here is that row:

:row
{:boxed_radio_column
{label = "Border";
:row
[color="#8b0000"]{[/color]: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;}[color="#8b0000"]}[/color]
:row
[color="#8b0000"]{[/color]: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;}}}[color="#8b0000"]}[/color]

Posted
I think brackets in red need to go away

 

The brackets are there for formatting the slides to the right of the buttons. They stay. The question is not what am i doint wrong it is how can i supplement my program to allow the buttons change values from 1 to 0 when the other button value changes inversely so.

 

Matt

Posted

Well how do i keep the images to the left of the boxes and them inverse is the new question then!

 

Thanks,

Matt

Posted

Why not use a row of two columns?

 

: boxed_column {

 : row {

   : radio_column {

     : radio_button { }
     : radio_button { }

   }

   : column {

     : image { }
     : image { } 
   }
 }
}

  • 2 weeks later...
Posted

If you have several radio_rows or radio_columns and you want to let them work as if there's only one, you can set the first item and clear it inmedially.

 

Let's say there are 2 radio_columns. When you select an radio_button of the first column, then you can clear the 2nd with an action for all radio_buttons like:

(set_tile "first_item_of_column2" "2")(set_tile "first_item_of_column2" "0"); clear radio_colum2

And in the 2nd radio_column you can clear the first.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...