NiftyGui DropDown not found

Hey guys,

I’m trying to use the NiftyGui DropDown.
It’s declared in the xml file like this:
[java]
<control id=“clockwise” name=“dropDown” x=“60%” y=“10%”/>
[/java]

I try to get the DropDown object in java like this:
[java]
System.out.println(nifty.getScreen(screenId).debugOutput());
DropDown ddclock = nifty.getScreen(screenId).findNiftyControl(“clockwise”, DropDown.class);
[/java]

I have also tried different classes and mehtods like ‘DropDownControl’ or ‘.findControl(…)’, but I get always the same error.

ddclock is null.

When I look at the debug output I see the following excerpt:
[java]
[clockwise] ControlType childLayout [horizontal]
style [nifty-drop-down]
state [normal]
position [x=0, y=0, w=0, h=0]
constraint [60%, 10%, null, 23px]
padding [0px, 0px, 0px, 0px]
margin [0px, 0px, 0px, 0px]
flags [ focusable, enabled(0), visible, mouseable]
effects [ {}]
renderOrder [0]
render order: [null (0)][null (1)]
[/java]

Any ideas on what could go wrong?
Thanks in advance!

I really don’t know what to do…
Now I’ve spent quite some time trying to find one working xml example.
Or one working example at all…

At least I saw the offical niftygui demo thing:
niftygui demo
But in this example the niftygui is made with java…
Which leads me to my final question:

Is there a working example at all?!

Are dropdowns not supported anymore with xml or what?

EDIT:
ahhh
Nifty could not find the element, because the screen was not properly added.
Mea culpa I guess.

Altough it would’ve been nice to find a few examples with xml at all.

New File → GUI → Choose Nifty example you need.

thanks, didn’t know about that.