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
msharp
Super User (Alumni)

Keep Dialog Window Open?

Anyone have a quick code to mimic the "Keep dialog open" option you see in the table platforms, like 'subset'.  If yes, does it work with a Modal window?

10529_pastedImage_0.png

11 REPLIES 11
msharp
Super User (Alumni)

Re: Keep Dialog Window Open?

I'm not sure what's confusing about a function doing two different things based on the expressions supplied and the object it influences.  Check out the delete command below:

10538_pastedImage_0.png

I'm not sure what error you are getting in the log, but you can definitely supply scripts to the 'OK' and "Cancel' buttons regardless if the window is modal or not.  From what you describe above, I get the feeling you don't understand what a Modal window is, but I could be wrong.

msharp
Super User (Alumni)

Re: Keep Dialog Window Open?

You can also try:

Names Default to Here( 1 );

keepopen = 0;

New Window( "Example", Show Menu( 0 ), Show Toolbars( 0 ), Suppress Autohide,

  <<Modal, <<On Validate(!keepopen),

  Text Box( "Example: Keep Dialog Open Checkbox" ),

  Text Box( "" ),

  H List Box(

    keepcbox = Check Box( "Keep dialog open", keepopen = keepcbox << get( 1 ) ),

    Button Box( "OK",

      // Insert name of an expression to run as a script

    ),

    Button Box( "Cancel")

  )

);

<<On Validate(expression),  runs the expression when the OK button is hit.  If the expression returns 1 then it will close the window.  This has the benefit of allowing Cancel and X buttons to actually close the window, but prevents OK button from doing so.