htmlDialog / webDialog restore

Hi all,

I’m using WebDialog and/or HTMLDialog to show some page in Sketchup. If this dialog is in the background and the users opens it again, i bring it back to the front using dialog.bring_to_front …So far so good.

The issue is, when the user minimizes the dialog and i bring it back to the front, it stays minimized while i would like to restore it to its previous location and size from before minimizing it.

Is there a way to do this? I couldn’t find any methods or examples for minimizing, restoring or maximizing dialogs.

I haven’t come across that one, but I moved this to the Ruby category for better responses…

john

You haven’t found such a method yet because the API does not give more fine-grained control over window management (and in my opinion it’s not the scope of a 3D modeler API as long as the defaults are sane). It is very likely to specific to the window manager being used, whether raising a window also unminimizes it at the same time. There may be ways outside the API to achieve it, but they are not nice and you would add a heavy legacy that you would have to maintain and test.

Why would your users minimize the webdialog at all?
Frequency: Is this a common behavior or an edge case?
Severety: Would your change prevent a severe issue/bug or is it rather cosmetic?

Its a fairly extended and complex application including database management, editting, manipulating data and adding input. It contains multiple windows that users might open simultaneously. I have no control over that behaviour of the user.

Why would your users minimize the webdialog at all?
Users can open multiple windows at the same time and might want to minimize windows they wont be using for now.

Frequency: Is this a common behavior or an edge case?
Its pretty common.

Severety: Would your change prevent a severe issue/bug or is it rather cosmetic?
Its a cosmetic / usability issue. Users might be confused that windows they expect to open are invisible while they are visible in the corner of a screen. But since that is not very visible it might confuse them that they dont see a window they expect to pop up.

I just tested SU2018 with a UI::HtmlDialog on the primary display under Win10, and when minimized, calling #bring_to_front upon it caused it to be restored and receive the focus.

However, the same test for the old deprecated UI::WebDialog class fails. The dialog window remains minimized. (It is not likely this old class will be fixed.)

1 Like

Hey Dan,

Thanks for the reply. I tested last with UI::WebDialog indeed and that didnt work. I know its deprecated and i’m updating to use UI::HtmlDialog on all places and will try again. I haven’t implemented it on all locations.

I’ll post the results when done !