Author Topic: boxed radio buttons in two columns  (Read 168 times)

0 Members and 1 Guest are viewing this topic.

Browny501

  • Mosquito
  • Posts: 15
boxed radio buttons in two columns
« on: March 20, 2020, 07:01:05 PM »
I'm trying to stack two columns of radio buttons so the entire box acts as one set of radio buttons .

I've tried action tile so when "GRADARROW1 is on, GRADARROWS3, 4, 5 and 6 are off, but that keeps crashing, so i must be doing something wrong

Im also have trouble with the rest of the dcl lining up in nice neat columns, is there a good link to help with my setting out ie graph paper, or online dcl designer


: boxed_radio_column {
  label = "Display Gradient";
  //fixed_width = true;
  alignment = centered;
  : row {
           : radio_button {         
             label = " 1 : xx >";
             key   = "GRADARROW1";         
             alignment = left;
           }
           : radio_button {         
             label = " < 1 : xx";
             key   = "GRADARROW2";           
            alignment = left;
           }
        }
  : row {
           : radio_button {         
             label = " FALL >";
             key   = "GRADARROW3";
             alignment = left;
           }
           : radio_button {         
             label = " < FALL";
             key   = "GRADARROW4";
             alignment = left;
           }             
        }
  : row {
           : radio_button {         
             label = " < FLAT >";
             key   = "GRADARROW5";
             alignment = left;
           }
           : radio_button {         
             label = " Tadpole";
             key   = "GRADARROW6";
             alignment = left;
           }             
        }
        }    //end gradient column

BIGAL

  • Bull Frog
  • Posts: 425
  • 30 + years of using Autocad
Re: boxed radio buttons in two columns
« Reply #1 on: March 21, 2020, 01:29:16 AM »
Maybe toggles ? They are more on/off.

Not sure exactly what it is you trying to do pretty sure read some where radio buttons only 1 on and must have 1 on, so you can not have 2nd column all off.

How many to be turned on at one time do circles and solid hatch post an image with combo's.

Try the ABCDE example in the attached.

« Last Edit: March 21, 2020, 01:35:04 AM by BIGAL »
A man who never made a mistake never made anything

Browny501

  • Mosquito
  • Posts: 15
Re: boxed radio buttons in two columns
« Reply #2 on: March 21, 2020, 02:18:45 AM »
Thanks BIGAL, what I’m trying to achieve is force the user to only pick one option from a selection of six, unfortunately I can’t see the .lsp on my iphone so I’ll check it out later, hopefully that will sort it. If it does thanks in advance.
« Last Edit: March 21, 2020, 03:50:05 AM by Browny501 »

roy_043

  • Water Moccasin
  • Posts: 1769
  • BricsCAD 18
Re: boxed radio buttons in two columns
« Reply #3 on: March 21, 2020, 04:28:27 AM »
To solve the alignment issue see here:
https://www.theswamp.org/index.php?topic=3289.msg40703#msg40703
You should nest two columns in a row instead of three rows in a column.
There is no need for:
Code: [Select]
alignment = left;
The radio_cluster tile used in the example does not seem to work however. See here:
https://www.theswamp.org/index.php?topic=52731.0
So you will have to rely on code to deselect radios.
This will deselect the "GRADARROW1" radio:
Code: [Select]
(set_tile "GRADARROW1" "0")

BIGAL

  • Bull Frog
  • Posts: 425
  • 30 + years of using Autocad
Re: boxed radio buttons in two columns
« Reply #4 on: March 21, 2020, 08:49:24 PM »
If you want 1 only from 6 use this. Its a library routine using a dcl to make a choice. It returns either button number or the text string in Variable ANS.
A man who never made a mistake never made anything