- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Preventing New Window from being maximized/resized?
To my knowledge you cannot easily do this, but few questions:
- 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).
- 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
- Other is Caption() but it is it's own thing
- If you wish to prevent resizing, why not use modal window?
- Is there a specific issue in using scheduler?
- That thread has the most probable answer: you might have to go outside the scripting language and do it from the operating system
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Preventing New Window from being maximized/resized?
- 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?
- If you wish to prevent resizing, why not use a modal window? - Bcos Modal window prevents accessing other files/tables
- Is there a specific issue in using scheduler? The issue is it slows down the loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Preventing New Window from being maximized/resized?
This is a nice hack. Thanks Jarmo