cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-801318%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%E6%88%96%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801318%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%3CSPAN%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E6%83%B3%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%2F%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%E3%80%82%E6%88%91%E7%9F%A5%E9%81%93%E2%80%9C%20%3CSTRONG%3E%26lt%3B%26lt%3B%20%3CEM%3EModal%3C%2FEM%3E%3C%2FSTRONG%3E%20%E2%80%9D%E7%AA%97%E5%8F%A3%EF%BC%8C%E4%BD%86%E6%98%AF%E8%BF%98%E6%9C%89%E5%85%B6%E4%BB%96%E6%96%B9%E6%B3%95%E5%90%97%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E5%8F%91%E7%8E%B0%E4%BA%86%E8%BF%99%E4%B8%AA%E5%A8%81%E8%83%81%EF%BC%8C%E4%BD%86%E5%AE%83%E5%9C%A8%E5%90%8E%E5%8F%B0%E8%BF%90%E8%A1%8C%E4%B8%80%E4%B8%AA%E8%B0%83%E5%BA%A6%E7%A8%8B%E5%BA%8F%EF%BC%8C%E6%88%91%E4%B8%8D%E5%96%9C%E6%AC%A2%E8%BF%99%E4%B8%AA%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-to-stop-users-from-resizing-windows-in-JSL%2Ftd-p%2F15168%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FHow-to-stop-users-from-resizing-windows-in-JSL%2Ftd-p%2F15168%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jackie__0-1727098266586.png%22%20style%3D%22width%3A%20198px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68534i81DADF8B3EAD97DF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jackie__0-1727098266586.png%22%20alt%3D%22Jackie__0-1727098266586.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-801318%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8A%A8%E5%8C%96%E5%92%8C%E8%84%9A%E6%9C%AC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801339%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%2F%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801339%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%9C%A8%E8%84%9A%E6%9C%AC%E7%B4%A2%E5%BC%95%E4%B8%AD%E6%9F%A5%E6%89%BE%E7%AA%97%E5%8F%A3%E5%A4%A7%E5%B0%8F%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ew%20%3D%20new%20window(%22test%22)%3B%0Aw%20%26lt%3B%26lt%3B%20Set%20Window%20Size(%20800%2C%201200%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%2F%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%8D%AE%E6%88%91%E6%89%80%E7%9F%A5%EF%BC%8C%E4%BD%A0%E4%B8%8D%E8%83%BD%E8%BD%BB%E6%98%93%E5%81%9A%E5%88%B0%E8%BF%99%E4%B8%80%E7%82%B9%EF%BC%8C%E4%BD%86%E6%9C%89%E5%87%A0%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%9A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%E6%9C%80%E9%87%8D%E8%A6%81%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9A%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E9%98%BB%E6%AD%A2%E7%94%A8%E6%88%B7%E8%B0%83%E6%95%B4%E7%AA%97%E5%8F%A3%E5%A4%A7%E5%B0%8F%EF%BC%88%E8%BF%99%E4%B8%8E%20JMP%20%E6%97%A0%E6%B3%95%E8%B0%83%E6%95%B4%E7%AA%97%E5%8F%A3%E5%A4%A7%E5%B0%8F%E7%9A%84%E6%84%9F%E8%A7%89%E4%B8%8D%E5%A4%AA%E7%9B%B8%E7%AC%A6%EF%BC%89%E3%80%82%3CBR%20%2F%3E%3COL%3E%3CLI%3E%20JMP%20%E4%B8%AD%E7%9A%84%E4%B8%80%E4%B8%AA%E7%AA%97%E5%8F%A3%E9%98%BB%E6%AD%A2%E6%82%A8%E6%9C%80%E5%A4%A7%E5%8C%96%E5%AE%83%EF%BC%8C%E5%AE%83%E6%98%AF%E5%9B%BE%E4%BE%8B%E7%AA%97%E5%8F%A3%EF%BC%8C%E4%BD%86%E6%82%A8%E4%BB%8D%E7%84%B6%E5%8F%AF%E4%BB%A5%E8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%E7%BB%9F%E4%B8%AD%E6%89%A7%E8%A1%8C%E6%AD%A4%E6%93%8D%E4%BD%9C%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801345%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%2F%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801345%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%20%3C%2FP%3E%3COL%3E%3CLI%3EJMP%20%E4%B8%AD%E7%9A%84%E4%B8%80%E4%B8%AA%E7%AA%97%E5%8F%A3%E9%98%BB%E6%AD%A2%E6%82%A8%E6%9C%80%E5%A4%A7%E5%8C%96%E5%AE%83%EF%BC%8C%E5%AE%83%E6%98%AF%E5%9B%BE%E4%BE%8B%E7%AA%97%E5%8F%A3%EF%BC%8C%E4%BD%86%E6%82%A8%E4%BB%8D%E7%84%B6%E5%8F%AF%E4%BB%A5%E8%B0%83%E6%95%B4%E5%AE%83%E7%9A%84%E5%A4%A7%E5%B0%8F%EF%BC%8C%E6%89%80%E4%BB%A5%E4%B9%9F%E8%AE%B8%E6%9C%89%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95%E5%8F%AF%E4%BB%A5%E7%A6%81%E7%94%A8%E6%9C%80%E5%A4%A7%E5%8C%96%20-%3CSTRONG%3E%E6%88%91%E4%BB%8E%E6%9D%A5%E6%B2%A1%E6%9C%89%E9%81%87%E5%88%B0%E8%BF%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E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B8%8D%E7%9F%A5%E9%81%93%E8%AF%A5%E5%A6%82%E4%BD%95%E5%81%9A%E3%80%82%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%E4%BD%86%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%83%B3%E6%8F%90%E4%BE%9B%E9%9D%9E%E5%B8%B8%E7%83%A6%E4%BA%BA%E7%9A%84%E7%94%A8%E6%88%B7%E4%BD%93%E9%AA%8C%EF%BC%8C%E4%BD%A0%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E5%9B%BE%E5%BD%A2%E8%84%9A%E6%9C%AC%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Anw%20%3D%20New%20Window(%22Example%22%2C%20%26lt%3B%3CSIZE%3E%3C%2FSIZE%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FCODE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801350%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E9%98%B2%E6%AD%A2%E6%96%B0%E7%AA%97%E5%8F%A3%E6%9C%80%E5%A4%A7%E5%8C%96%2F%E8%B0%83%E6%95%B4%E5%A4%A7%E5%B0%8F%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801350%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E4%B8%8D%E9%94%99%E7%9A%84%20hack%E3%80%82%E8%B0%A2%E8%B0%A2%20Jarmo%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Jackie_
Level VI

Preventing New Window from being maximized/resized?

Hello,

 

I want to prevent the new window from being maximized/resized. I am aware of the "<<Modal" window, but is there an alternate way? 

Found this threat but it runs a scheduler in the background which I don't prefer

https://community.jmp.com/t5/Discussions/How-to-stop-users-from-resizing-windows-in-JSL/td-p/15168

Jackie__0-1727098266586.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Preventing New Window from being maximized/resized?

No idea how that could be done.

 

But if you wish to provide very annoying user experience you can use graphic scripts

Names Default To Here(1);

nw = New Window("Example", <<size(200, 200),
	gb = Graph Box(
		Frame Size(1, 1)
	),
	box = V Splitter Box(
		Size(640, 480),
		H Splitter Box(
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(9, 112, 84));
			),
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(255, 222, 0));
			)
		),
		H Splitter Box(
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(101, 153, 255));
			),
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(255, 153, 0));
			)
		)
	)
);

(gb << Xpath("//AxisBox")) << visibility("Collapse");

Eval(EvalExpr(
	gb[FrameBox(1)] << Add Graphics Script(
		Expr(nw) << Zoom Window;
	);	
));

 

-Jarmo

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Preventing New Window from being maximized/resized?

Look in the Scripting Index for Window Size

w = new window("test");
w << Set Window Size( 800, 1200 );
Jim
jthi
Super User

Re: Preventing New Window from being maximized/resized?

To my knowledge you cannot easily do this, but few questions:

  1. The most important question: why would you want to prevent user from resizing a window (doesn't really fit the feeling of JMP to not be able to resize a window).
    1. One window in JMP which prevents you from maximizing it and it is Legend window but you can still resize it so maybe there is a way to disable maximizing
    2. Other is Caption() but it is it's own thing
  2. If you wish to prevent resizing, why not use modal window?
  3. Is there a specific issue in using scheduler?
  4. That thread has the most probable answer: you might have to go outside the scripting language and do it from the operating system
-Jarmo
Jackie_
Level VI

Re: Preventing New Window from being maximized/resized?

@jthi 

  1. One window in JMP which prevents you from maximizing it and it is Legend window but you can still resize it so maybe there is a way to disable maximizing - I have never came across this, can you share an example code?
  1. If you wish to prevent resizing, why not use a modal window? - Bcos Modal window prevents accessing other files/tables 
  2. Is there a specific issue in using scheduler? The issue is it slows down the loop
jthi
Super User

Re: Preventing New Window from being maximized/resized?

No idea how that could be done.

 

But if you wish to provide very annoying user experience you can use graphic scripts

Names Default To Here(1);

nw = New Window("Example", <<size(200, 200),
	gb = Graph Box(
		Frame Size(1, 1)
	),
	box = V Splitter Box(
		Size(640, 480),
		H Splitter Box(
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(9, 112, 84));
			),
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(255, 222, 0));
			)
		),
		H Splitter Box(
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(101, 153, 255));
			),
			Spacer Box(
				<<Set Fill(1);
				<<Color(RGB Color(255, 153, 0));
			)
		)
	)
);

(gb << Xpath("//AxisBox")) << visibility("Collapse");

Eval(EvalExpr(
	gb[FrameBox(1)] << Add Graphics Script(
		Expr(nw) << Zoom Window;
	);	
));

 

-Jarmo
Jackie_
Level VI

Re: Preventing New Window from being maximized/resized?

This is a nice hack. Thanks Jarmo