Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Stas
Level I

Creating tabs in JSL

Hey guys, I'm a very new user and my question is very basic, can you please help me understand how do I create tabs with content? For example instead of textbox X, X tab that will show Y and Z textboxes with it content.

vlistbox(
						textbox("X", <<font color(blue), <<set font size(10), <<set font style("bold")),
						textbox("Y", <<font color(black), <<set font size(10), <<set font style("bold")),
					hlistbox(
								
								
							Button Box("abc", 
							
								Include("")
							),			
							Button Box("def", 
								
								Include("")
							),
													
						),
						textbox("Z", <<font color(black), <<set font size(10), <<set font style("bold")),
					hlistbox(
								
							Button Box("ghi", 
								
								open("")
							),	
							Button Box("jkl", 
								
								Include("")
							),			
							Button Box("mno", 
								
								Include("")
							),
													
						),	
					),

 

 

8 REPLIES 8
Highlighted
pmroz
Super User

Re: Creating tabs in JSL

Something like this?   Be sure to check the scripting index for tab box.

nw = New Window( "Tab Test",
	V List Box(
		tab box(
			"X",
			H List Box(
				Text Box( "Y", <<font color( black ), <<set font size( 10 ), <<set font style( "bold" ) ),
				Button Box( "abc", 
					Include( "" )
				),
				Button Box( "def", 
					Include( "" )
				), 
			),
			"Z",
			H List Box(
				Button Box( "ghi", 
					Open( "" )
				),
				Button Box( "jkl", 
					Include( "" )
				),
				Button Box( "mno", 
					Include( "" )
				),
			), 
		),
	),
);
Highlighted
Stas
Level I

Re: Creating tabs in JSL

It's great, Thank you very much 

Highlighted
Stas
Level I

Re: Creating tabs in JSL

In continue to my question, is there a way to style the tabs or (which is better) change the color/font of the tab text?

Highlighted
ian_jmp
Staff

Re: Creating tabs in JSL

Not answering your question directly but, continuing the example from @pmroz, you can do a right mouse click to bring up the properties of the display:

 

Screenshot 2020-05-21 at 10.50.15.png

 

Screenshot 2020-05-21 at 10.55.42.png

Highlighted
pmroz
Super User

Re: Creating tabs in JSL

Cool Ian - I had no idea you could do that!  Thanks for pointing it out.

Highlighted
ian_jmp
Staff

Re: Creating tabs in JSL

No problem! A nice (JMP 14?) feature that I always thought didn't get enough attention.

Highlighted
Martin
Level IV

Re: Creating tabs in JSL

@pmroz what is the purpose of the "V List Box" in this script?

 

Martin

Highlighted
pmroz
Super User

Re: Creating tabs in JSL

I only included it because the original poster had it in their code.  Technically it is not needed for my example.

Article Labels

    There are no labels assigned to this post.