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
SG
SG
Level III

Hide Window Contents

I am attempting to use a button press to reveal the remaining information for a window. The user will pick a date range and that date range will be used to ping a SQL server to populate a table containing data from the matching range. Then I want to be able to use data from the table to allow the user to then make a second selection. This selection will further narrow the table down at which point it would be displayed. I am attempting to use the Unhide Next Item with a Button Box, but the items I am trying to hide do not understand the <<hide command. Is there a better way to do this? From what I can tell only Text Boxes can be hidden?

 

New Window("XYZTEC Data Pull",
	<<Modal,
	Text Box("XYZTEC Data Pull", Set Font Style("Bold"), Set Font Size(16)),
	Text Box(" "),	// places blank line beneath title
	Text Box("Select Date Range: ", Set Font Style("Bold Underline")),
	H List Box(
		V List Box(
			Text Box("Start Date:"),
			sDate = Number Edit Box((Today() - 31536000), 9, << Set Format(Format("m/d/y")))
		),
		V List Box(
			Text Box("          ")
		),
		V List Box(
			Text Box("End Date"),
			eDate = Number Edit Box(Today(), 9, << Set Format(Format("m/d/y")))
		)
	),
	Text Box(" "),	// place blank line beneath date select
	Outline Box("",
		getDates = Button Box("Confirm Date Range",
			getDates << Set Button Name("Working...");
			sDate = sDate << Get;
			eDate = eDate << Get;
			m1517t = include("m1517t.jsl");
			m1774t = include("m1774t.jsl");
			m1517t << Concatenate(m1774t, Keep Formulas, Output Table Name("XYZTEC Data Pull"), Invisible);
			Summarize(L = By(:Method Name));
			show(L);
			getDates << Unhide Next Item;
			getDates << Set Button Name("Complete");
			dt = Current Data Table()
			),
		V List Box("",
			ComboBox(L),
			H List Box(Button Box("OK", flag = 1), Button Box("Cancel", flag = 0)),
			<<hide
		)
	)
);

If(flag == 0, Stop());
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hide Window Contents

Jim's solution offers a lot of flexibility. I often use the Visibility( "Visible" | "Hidden" | "Collapse" ) display box attribute when simple is sufficient. You can set this initially as in

New Window( "You Can't See Me",
Button Box( "I'm Hiding", expression, << Visibility( "Collapse" ) )
);

Then I use a script or function in another control to make the button visible. You can also leave the button visible but disable it. It depends oh the design of your user interface.

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Hide Window Contents

Here is the method that I use to Hide and UnHide items within a Display Window

Names Default To Here( 1 );

HiddenButton = Button Box( "hidden" );

New Window( "Hidden",
	modal,
	MyVLB = V List Box(
		ViewingBB = Button Box( "Click to UnHide",
			ViewingBB << delete;
			MyVLB << append( HiddenButton );
		)
	)
);
Jim

Re: Hide Window Contents

Jim's solution offers a lot of flexibility. I often use the Visibility( "Visible" | "Hidden" | "Collapse" ) display box attribute when simple is sufficient. You can set this initially as in

New Window( "You Can't See Me",
Button Box( "I'm Hiding", expression, << Visibility( "Collapse" ) )
);

Then I use a script or function in another control to make the button visible. You can also leave the button visible but disable it. It depends oh the design of your user interface.

SG
SG
Level III

Re: Hide Window Contents

Both of these seem to be able to do what I want, however Mark's solution was easier for me to implement the way I wanted. I think if this was a more critical program Jim's solution could provide a cleaner result. However, Mark's works awesome for what I needed.

 

Thank you both!