cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
blue1994
Level III

Create Tabs without scrolling horizontally

Hi, all
May I know is there any function that can make if I have 25 tabs in one user interface, then for example every 5 tabs, it will automatic go down another row(meant here 1-5 in first row, then 6-10 in second row and etc), which can prevent the user to scroll horizontally to the right.

I have search the scripting index for the tab list box, but I can't find any suitable the function.
Can anyone give me some hints?
Thanks.

For example script below:

nTabs = 25;

VariabilityWindow = New Window("Variability Chart",tb = Tab Box() );

For( i = 1, i <= nTabs, i++,
   
	tb << Insert(
        i,
		"variability chart" || Char( i ),
		V List box(
			Button Box( "Variability Chart #" || Char( i ) ),
	    )
    )
); 

   		

photo01.png

3 REPLIES 3
txnelson
Super User

Re: Create Tabs without scrolling horizontally

There isn't an automatic way to do that, however, you could construct your application to add additional rows, breaking on every 5 tabs.

Here is a hardwired illustration of setting up the rows.  Your program would just have to programatically build the structure

Names Default To Here( 1 );
New Window( "Example",
	Tab Box(
		Tab Page Box(
			"Row One",
			Tab Box(
				Tab Page Box( "Alpha", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Beta", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Gamma", Popup Box( {"x", ex = 1, "y", ex = 2} ) )
			)
		),
		Tab Page Box(
			"Row Two",
			Tab Box(
				Tab Page Box( "Alpha2", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Beta2", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Gamma2", Popup Box( {"x", ex = 1, "y", ex = 2} ) )
			)
		),
		Tab Page Box(
			"Row Three",
			Tab Box(
				Tab Page Box( "Alpha3", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Beta3", Popup Box( {"x", ex = 1, "y", ex = 2} ) ),
				Tab Page Box( "Gamma3", Popup Box( {"x", ex = 1, "y", ex = 2} ) )
			)
		)
	)
);
Jim

Re: Create Tabs without scrolling horizontally

JMP does not support tiered tabs. There are a couple of other solutions that might help you.

 

(1) You can se tthe overflow flag. This sets the window size to the size of its contents, and the tabs that don't fit are placed into a drop-down menu on the right, like browsers do.

nTabs = 25;

VariabilityWindow = New Window("Variability Chart",tb = Tab Box( << Set Overflow Enabled(1) ) );

For( i = 1, i <= nTabs, i++,
   
	tb << Insert(
        i,
		"variability chart" || Char( i ),
		V List box(
			Button Box( "Variability Chart #" || Char( i ) ),
	    )
    )
); 

 

(2) You can set the tab style to use a combo box (drop down menu) instead of horizontal tabs.

 

nTabs = 25;

VariabilityWindow = New Window("Variability Chart",tb = Tab Box( << Set Style( "combo" ) ) );

For( i = 1, i <= nTabs, i++,
   
	tb << Insert(
        i,
		"variability chart" || Char( i ),
		V List box(
			Button Box( "Variability Chart #" || Char( i ) ),
	    )
    )
);  

 

pmroz
Super User

Re: Create Tabs without scrolling horizontally

Maybe think about changing your interface a bit.

 

I had a similar situation where initially the number of tabs was small (5-10).  Then I encountered situations where there were going to be 35 tabs!  I changed the interface completely to the following:

 

I put a listbox on the left side with the names of the tabs in it, now called "topics".  Since it is a listbox there was no problem handling 35 topic names.  When the user clicks on a topic the display to the right gets updated with information/displays for that topic.  Incidentally there was so much information to display for a given topic that I split that into separate tabs, but there were a constant number of them (6).  Here's a sample:

TrendingToolSample.png