hi guys,
today i have a problem with the window Control…well
i am confused on how to set the visibility of the window … or reopen it after closing…
[java]
WindowControl w = this.screen.findNiftyControl("window-3", WindowControl.class);
w.setTitle("hallo");
w.getElement().setVisible(false);
[/java]
i seems to get a nullpointer exception… but java finds the window since i can change the title for example
but how to hide/show the window in general? didnt find anything except :
w.getContent() gets the content of the window…
there i thought getElement() should get the Element itself and i can hide/show it…but doesnt seem so
plz enlighten me
cheers
Terry
lol … solved it after another 2 mins…
for others :
[java]
WindowControl w = this.screen.findNiftyControl(“window-3”, WindowControl.class);
w.setTitle(“hallo”);
Element z = this.screen.findElementByName(“window-3”);
z.setVisible(!z.isVisible());
[/java]
but i have another problem :
how to add the draggable function within xml?
[xml]
<layer id=“windows” childLayout=“absolute”>
<control id=“window-3” name=“window” title=“Please Drag Me Too!” width=“500px” height=“400px” x=“400px”>
<text text=“I’m Another Window!” style=“base-font” color="#eeef" valign=“center” width=“100%” />
</control>
</layer>
[/xml]
so far it disapears and console says “WARNUNG: missing popup [draggablePopup] o_O”
from this statement i conclude it should be withing a popup and not within the same screen where i want to open it…but that didnt solve it …
thx in advance
Terry