cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
%3CLINGO-SUB%20id%3D%22lingo-sub-801318%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%C2%BFC%C3%B3mo%20evitar%20que%20la%20nueva%20ventana%20se%20maximice%20o%20cambie%20de%20tama%C3%B1o%3F%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%3EHola%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3EQuiero%20evitar%20que%20la%20nueva%20ventana%20se%20maximice%20o%20cambie%20de%20tama%C3%B1o.%20Conozco%20la%20ventana%20%22%20%3CSTRONG%3E%26lt%3B%26lt%3B%20%3CEM%3EModal%3C%2FEM%3E%3C%2FSTRONG%3E%20%22%2C%20pero%20%C2%BFexiste%20una%20forma%20alternativa%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%20Encontr%C3%A9%20esta%20amenaza%2C%20pero%20ejecuta%20un%20programador%20en%20segundo%20plano%20que%20no%20prefiero.%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%3EAutomatizaci%C3%B3n%20y%20scripting%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%3ERe%3A%20%C2%BFC%C3%B3mo%20evitar%20que%20se%20maximice%20o%20cambie%20el%20tama%C3%B1o%20de%20la%20nueva%20ventana%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801339%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EBusque%20en%20el%20%C3%ADndice%20de%20secuencias%20de%20comandos%20el%20tama%C3%B1o%20de%20la%20ventana%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%3ERe%3A%20%C2%BFC%C3%B3mo%20evitar%20que%20se%20maximice%20o%20redimensione%20la%20nueva%20ventana%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EQue%20yo%20sepa%20no%20es%20f%C3%A1cil%20hacerlo%2C%20pero%20tengo%20algunas%20preguntas%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ELa%20pregunta%20m%C3%A1s%20importante%3A%20%C2%BFpor%20qu%C3%A9%20querr%C3%ADas%20evitar%20que%20el%20usuario%20cambie%20el%20tama%C3%B1o%20de%20una%20ventana%20(realmente%20no%20se%20ajusta%20a%20la%20sensaci%C3%B3n%20de%20JMP%20de%20no%20poder%20cambiar%20el%20tama%C3%B1o%20de%20una%20ventana)%3F%3CBR%20%2F%3E%3COL%3E%3CLI%3E%20Una%20ventana%20en%20JMP%20que%20le%20impide%20maximizarla%20y%20es%20la%20ventana%20Leyenda%2C%20pero%20a%C3%BAn%20puede%20cambiar%20su%20tama%C3%B1o%2C%20por%20lo%20que%20tal%20vez%20haya%20una%20manera%20de%20deshabilitar%20la%20maximizaci%C3%B3n.%3C%2FLI%3E%3CLI%3E%20Otro%20es%20Caption()%20pero%20es%20algo%20propio%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%0A%3CLI%3ESi%20desea%20evitar%20el%20cambio%20de%20tama%C3%B1o%2C%20%C2%BFpor%20qu%C3%A9%20no%20utilizar%20la%20ventana%20modal%3F%3C%2FLI%3E%0A%3CLI%3E%C2%BFExiste%20alg%C3%BAn%20problema%20espec%C3%ADfico%20al%20utilizar%20el%20programador%3F%3C%2FLI%3E%0A%3CLI%3EEse%20hilo%20tiene%20la%20respuesta%20m%C3%A1s%20probable%3A%20es%20posible%20que%20tengas%20que%20salir%20del%20lenguaje%20%3CSTRONG%3Ede%20script%3C%2FSTRONG%3E%20y%20hacerlo%20desde%20el%20sistema%20operativo.%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%3ERe%3A%20%C2%BFC%C3%B3mo%20evitar%20que%20se%20maximice%20o%20cambie%20el%20tama%C3%B1o%20de%20la%20nueva%20ventana%3F%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%3EUna%20ventana%20en%20JMP%20que%20le%20impide%20maximizarla%20y%20es%20la%20ventana%20Leyenda%2C%20pero%20a%C3%BAn%20puede%20cambiar%20su%20tama%C3%B1o%2C%20por%20lo%20que%20tal%20vez%20haya%20una%20manera%20de%20deshabilitar%20la%20maximizaci%C3%B3n.%20%3CSTRONG%3ENunca%20me%20he%20encontrado%20con%20esto%2C%20%C2%BFpuede%20compartir%20un%20c%C3%B3digo%20de%20ejemplo%3F%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3COL%3E%3CLI%3ESi%20desea%20evitar%20el%20cambio%20de%20tama%C3%B1o%2C%20%C2%BFpor%20qu%C3%A9%20no%20utilizar%20una%20ventana%20modal%3F%20-%20%3CSTRONG%3EBcos%20La%20ventana%20modal%20impide%20el%20acceso%20a%20otros%20archivos%2Ftablas%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%C2%BFExiste%20alg%C3%BAn%20problema%20espec%C3%ADfico%20al%20utilizar%20el%20programador%3F%20%3CSTRONG%3EEl%20problema%20es%20que%20ralentiza%20el%20bucle.%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-801347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%C2%BFC%C3%B3mo%20evitar%20que%20se%20maximice%20o%20cambie%20el%20tama%C3%B1o%20de%20la%20nueva%20ventana%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801347%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENo%20tengo%20idea%20de%20c%C3%B3mo%20se%20podr%C3%ADa%20hacer%20eso.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EPero%20si%20desea%20proporcionar%20una%20experiencia%20de%20usuario%20muy%20molesta%2C%20puede%20utilizar%20scripts%20gr%C3%A1ficos.%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%3ERe%3A%20%C2%BFC%C3%B3mo%20evitar%20que%20se%20maximice%20o%20cambie%20el%20tama%C3%B1o%20de%20la%20nueva%20ventana%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-801350%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EEste%20es%20un%20buen%20truco.%20Gracias%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