Restoring a minimized window?

Questions, tips and tricks and techniques for scripting in Servoy

Restoring a minimized window?

Postby joe26 » Tue Dec 27, 2016 2:18 am

Is there a way to programmatically raise a minimized window in the smart client?

I've been using win.toFront() but haven't found a way to show it again, once it is minimized by the user.

thanks!
--Joe.

Servoy 7.4.8
joe26
 
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Re: Restoring a minimized window?

Postby kwpsd » Tue Dec 27, 2016 8:06 pm

Well, you could try:

Code: Select all
plugins.window.maximize()


Although, I just posted that it is not working in 8.1.1. Also, read the wiki the window plugin for more info on how to use this function.

See http://forum.servoy.com/viewtopic.php?f=2&t=21560

I hope this helps!
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 701
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Restoring a minimized window?

Postby joe26 » Wed Dec 28, 2016 10:24 pm

Thank you, Kim, but it isn't working for me in 7.4.8 either. Cannot say whether it has ever worked, because I rarely minimize windows.

plugins.window.maximize(windowx.title);
plugins.window.maximize(windowName);
windowx.toFront();

If the window is not minimized, toFront() works fine.

If the window is not minimized, maximize just doesn't work.

I've located references to the Java status setting but really not interested in building a bean right now...

minimize with frame.setState(Frame.ICONIFIED)
restore with frame.setState(Frame.NORMAL)

--Joe.
joe26
 
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Workaround

Postby Bernd.N » Mon Jan 02, 2017 11:37 am

Maybe a workaround helps?
However I did not try this before posting:

Code: Select all
var
   wWindow = application.getWindow(sWindowName),
   iScreenHeight = application.getScreenHeight(),
   iScreenWidth = application.getScreenWidth();

wWindow.setSize(iScreenWidth, iScreenHeight);
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Restoring a minimized window?

Postby joe26 » Mon Jan 02, 2017 9:32 pm

I've already tried the window.maximize(), and it maximizes if I click on the minimized window.

Otherwise, it fails silently.

I may try the bounds, but thankfully I can ignore this action for a bit. Seems like a crippling bug, imho.

The only workaround that I can come up with is open the view in a NEW window, if I somehow sense the user it getting frustrated by a count of an onAction that they keep pushing the button to active the window. Seems like a screwed up workaround and wasteful of resources, but there it is.

Thanks!
--Joe.
joe26
 
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Re: Restoring a minimized window?

Postby joe26 » Tue Jan 17, 2017 8:47 pm

Bernd,

I wasn't successful recalling a minimized window with setting window bounds. It certainly changes the bounds of the window, but does not un-minimize the window.

Attempted to sneak it toBack() and then toFront(), which was also unsuccessful.

I guess if I get multiple requests for the window, a the form can be opened in a new window which is usually visible.

Thanks again!
--Joe.
joe26
 
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm

Re: Restoring a minimized window?

Postby joe26 » Tue Feb 14, 2017 7:14 pm

Does anyone know which version of Servoy can raise a window from the minimized state?

Thanks!
joe26
 
Posts: 172
Joined: Wed Jun 19, 2013 10:30 pm


Return to Methods

Who is online

Users browsing this forum: No registered users and 8 guests

cron