Jump to content

DCL Radio Buttons Checked by Default


Recommended Posts

Posted

I've found this DCL by Kenny Ramage which I intend adapting for a delete entities lisp. I intend to replace "Bolt Holes &Site" with "Points", "Bolt Holes Sho&p" with "Very Short Lines" etc etc

 

samp4 : dialog {				//dialog name
     label = "Structural Holes" ;		//give it a label

      :boxed_radio_column {			//define radio column
      label = "Type" ;				//give it a label

       : radio_button {			//define radion button
    	  key = "rb1" ;				//give it a name
    	  label = "Bolt Holes &Site" ;		//give it a label
    	  value = "1" ;				//switch it on
       }					//end definition

    	: radio_button {			//define radio button
    	  key = "rb2" ;				//give it a name
    	  label = "Bolt Holes Sho&p" ;		//give it a label
    	}					//end definition

    	: radio_button {			//define radio button
    	  key = "rb3" ;				//give it a name
    	  label = "Bolt Holes &Hidden" ;	//give it a label
    	  }					//end definition

    	: radio_button {			//define radio button
    	  key = "rb4" ;				//give it a name
    	  label = "Bolt Holes &Ctsnk" ;		//give it a label
    	}					//end definition

    	: radio_button {			//define radio button
    	  key = "rb5" ;				//give it a name
    	  label = "Bolt Holes &Elevation" ;	//give it a label
    	  }					//end definition

    	: radio_button {			//define radion button
    	  key = "rb6" ;				//give it a name
    	  label = "Bolt Holes &Slotted" ;	//give it a label
    	}					//end definition

       }					//end radio column

    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 = 1.0 ;				//and now a width
    }						//end image

         : paragraph {				//define paragraph

    : text_part {				//define text
    label = "Designed and Created";		//give it some text
    }						//end text

    : text_part {				//define more text
    label = "by Kenny Ramage";			//some more text
    }						//end text

    }						//end paragraph

    }						//end row
				
    }						//end dialog

 

 

What I'd like is for all the radio butons to be checked by default, I can then de-select any I wish before clicking OK.

 

What do I have to change/add to make all the radio buttons checked?

Posted

Use toggle tiles in place of radio_button tiles; radio_buttons are intended for selection of a single item.

 

To enable the toggle without user input, use:

(set_tile "yourtogglekey" "1")

Or set the DCL value attribute to "1".

Posted

Nice one Lee, thanks for that

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...