cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
aallman
Level III

Set Checkbox Label Wraping or Width

Hello,

 

The script I am writing starts with a window that allows the user to select which columns to create using check boxes. I have several groups of check boxes, where the user can select any combination of the 4 options in a group or select a "Select All" check box for that group. (I am not sure if this is the best way to do this or not but it seems to be working.) The problem that I am running into is that my "Select All" Check boxes have very long names and it ends up making my window very wide and disproportionate. I want to somehow set the text to wrap for these "Select All" check boxes, but I haven't been able to get the Set Width or Set Wrap functions to change anything. The script is very long and includes several nested H List Boxes and V List Boxes, so maybe I need to change the width/wrap for one of the list boxes instead? I am fairly new to scripting so if there is a simpler way of creating this window, please let me know!

 

Names Default To Here( 1 );

Win1 = New Window( "Base Count Selection",
	<<Modal,
	Show Menu( 0 ),
	Show toolbars( 0 ),
	V List Box(
		Text Box( "Select which bases to create count columns for.", <<Margin( 10, 20 ) ),
		H List Box(
			Border Box( Left( 15 ), Right( 15 ), top( 15 ), bottom( 15 ), sides( 15 ),
				V List Box(
					Text Box( "Modified Bases", <<Set Font Size( 11 ) ),
					H List Box(
						V List Box(
							lnacb = Check Box( {"+A", "+C", "+T", "+G"} ),
							Spacer Box( 25 ),
							lnaa = Check Box( "Select All LNA", <<SetFunction( lnacb << Set All( 1, run script( 1 ) ) ) ),
							<<Margin( Right( 30 ) )
						),
						V List Box(
							omecb = Check Box( {"mA", "mC", "mT", "mG"} ),
							Spacer Box( 25 ),
							omea = Check Box( "Select All OMe", <<SetFunction( omecb << Set All( 1, run script( 1 ) ) ) ),
							<<Margin( Right( 30 ) )
						),
						V List Box(
							moecb = Check Box( {"MOErA", "MOErC", "MOErT", "MOErG", "MOErU"} ),
							Spacer Box( 25 ),
							moea = Check Box( "Select All MOE", <<SetFunction( moecb << Set All( 1, run script( 1 ) ) ) ),
							<<Margin( Right( 30 ) )
						),
						V List Box(
							bnacb = Check Box( {"cEt A", "cEt C", "cEt T", "cEt G"} ),
							Spacer Box( 25 ),
							bnaa = Check Box( "Select All cEt", <<SetFunction( bnacb << Set All( 1, run script( 1 ) ) ) ),
							<<Margin( Right( 30 ) )
						)
					)
				), << Margin( Right( 10 ) )
			), 
		
			Border Box( Left( 15 ), Right( 15 ), top( 15 ), bottom( 15 ), sides( 15 ),
				V List Box(
					Text Box( "Thioated Bases", <<Set Font Size( 11 ) ),
					H List Box(
						V List Box(
							thicb = Check Box( {"A*", "C*", "T*", "G*"} ),
							Spacer Box( 25 ),
							thia = Check Box( "Select All Thioated DNA Bases", <<SetFunction( thicb << Set All( 1, run script( 1 ) ) ) ) 
							
							
						),
						V List Box(
							lthicb = Check Box( {"+A*", "+C*", "+T*", "+G*"} ),
							Spacer Box( 25 ),
							lthia = Check Box( "Select All Thioated LNA Bases", <<SetFunction( lthicb << Set All( 1, run script( 1 ) ) ) )
						
						),
						V List Box(
							mthicb = Check Box( {"mA*", "mC*", "mT*", "mG*"} ),
							Spacer Box( 25 ),
							mthia = Check Box( "Select All Thioated OMe Bases", <<SetFunction( mthicb << Set All( 1, run script( 1 ) ) ) )
						),
						V List Box(
							othicb = Check Box( {"MOErA*", "MOErC*", "MOErT*", "MOErG*"} ),
							Spacer Box( 25 ),
							othia = Check Box( "Select All Thioated MOE Bases", <<SetFunction( othicb << Set All( 1, run script( 1 ) ) ) )
						),

					)
				)
			)
		),
		totcb = Check Box(
			"Include Total Columns",
			<<Set Tip( "Creates a column with a total count of each base type selected. E.g. 'Total LNA Base Count'" ),
			<<Margin( 10, 30 )
		)
	)
);

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Set Checkbox Label Wraping or Width

Would it be acceptable to organize the border boxes vertically instead of horizontally?

View solution in original post

3 REPLIES 3
pmroz
Super User

Re: Set Checkbox Label Wraping or Width

Usually the CHECK ALL checkbox is shown at the top of a set of checkboxes, and doesn't even have a label.  How about this:

Names Default To Here( 1 );

Win1 = New Window( "Base Count Selection", <<Modal,
	Show Menu( 0 ),
	Show toolbars( 0 ),
	V List Box(
		Text Box( "Select which bases to create count columns for.", <<Margin( 10, 20 ) ),
		H List Box(
			Border Box( Left( 15 ), Right( 15 ), top( 15 ), bottom( 15 ), sides( 15 ),
				V List Box(
					Text Box( "Modified Bases", <<Set Font Size( 11 ) ),
					H List Box(
						V List Box(
							text box("LNA     "),
							lnaa = Check Box( "", <<SetFunction( lnacb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							lnacb = Check Box( {"+A", "+C", "+T", "+G"} ),
//							<<Margin( Right( 30 ) )
						),
						V List Box(
							text box("OMe     "),
							omea = Check Box( "", <<SetFunction( omecb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							omecb = Check Box( {"mA", "mC", "mT", "mG"} ),
//							<<Margin( Right( 30 ) )
						),
						V List Box(
							text box("MOE        "),
							moea = Check Box( "", <<SetFunction( moecb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							moecb = Check Box( {"MOErA", "MOErC", "MOErT", "MOErG", "MOErU"} ),
//							<<Margin( Right( 30 ) )
						),
						V List Box(
							text box("cEt     "),
							bnaa = Check Box( "", <<SetFunction( bnacb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							bnacb = Check Box( {"cEt A", "cEt C", "cEt T", "cEt G"} ),
//							<<Margin( Right( 30 ) )
						)
					)
				), << Margin( Right( 10 ) )
			), 
		
			Border Box( Left( 15 ), Right( 15 ), top( 15 ), bottom( 15 ), sides( 15 ),
				V List Box(
					Text Box( "Thioated Bases", <<Set Font Size( 11 ) ),
					H List Box(
						V List Box(
							text box("DNA Bases     "),
							thia = Check Box( "", <<SetFunction( thicb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							thicb = Check Box( {"A*", "C*", "T*", "G*"} ),
						),
						V List Box(
							text box("LNA Bases     "),
							lthia = Check Box( "", <<SetFunction( lthicb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							lthicb = Check Box( {"+A*", "+C*", "+T*", "+G*"} ),
						
						),
						V List Box(
							text box("OMe Bases     "),
							mthia = Check Box( "", <<SetFunction( mthicb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							mthicb = Check Box( {"mA*", "mC*", "mT*", "mG*"} ),
						),
						V List Box(
							text box("MOE Bases     "),
							othia = Check Box( "", <<SetFunction( othicb << Set All( 1, run script( 1 ) ) ) ),
							text box(""),
//							Spacer Box( 25 ),
							othicb = Check Box( {"MOErA*", "MOErC*", "MOErT*", "MOErG*"} ),
						),

					)
				)
			)
		),
		totcb = Check Box(
			"Include Total Columns",
			<<Set Tip( "Creates a column with a total count of each base type selected. E.g. 'Total LNA Base Count'" ),
			<<Margin( 10, 30 )
		)
	)
);

 

Re: Set Checkbox Label Wraping or Width

Would it be acceptable to organize the border boxes vertically instead of horizontally?

aallman
Level III

Re: Set Checkbox Label Wraping or Width

Yes, I don't see why not if that will help solve the problem!