Show hidden window

Hello,



is there a method to bring back up a window which has been hidden?

uhm, simply calling windowElement.show() did not work? O_o

I don’t have a show() method for Window.



Also, what does the revert property do when set on false? Does it make the window droppable anywhere?

Revert will, iirc, drop back the control where it was first dragged from.



This is what happens when you drag and drop a window and drop it in an area that hasn’t a “droppable”, in that case, nifty calls revert() internally.

But what does true and false mean for revert?

from the Nifty wiki


revert Boolean true When the "revert" parameter is set to "true" (the default value) this Draggable will revert its position back to its initial position when the drag operation has ended without a suitable drop target or when the mouse button is released while the drag operation is still in progress.


To be clear, I've just added:

When the "revert" parameter is set to "false" then the Draggable just stays at the position where you've released the mouse button


I don’t have a show() method for Window.


This is indeed missing on the NiftyControl interface. You can get access to the underlying Element with the getElement() method which is available at the Window (or at least its base interface NiftyControl). The Element instance you get *is* actually the Window element so you can call show() on it and it should do what you expect.

Note: The Window (and the NiftyControl) interface is just a different view to that Element to access the functionality of the Control in a nicer way.