Dropdown does not recognize onRelease method

I have two dropdown controls, first in a static windowBuilder, the second in a dynamic.

First:



[java]

panel(new PanelBuilder(){{

childLayoutHorizontal(); height(“25px”);

control(new LabelBuilder(“category_WOC”,“Category:”){{

width(“170px”); height(“20px”); textHAlign(operator_label); }});

panel(common.hspacer(“5px”));

control(new DropDownBuilder(“categoryValue_WOC”){{

width(“130px”); height(“20px”); textHAlign(operator_value);

visibleToMouse(true); interactOnRelease(“categoryMouseOnRelease()”);

}});

}});[/java]



Second:

[java]

panel(new PanelBuilder(){{

childLayoutHorizontal(); height(“25px”);

control(new LabelBuilder(“supplier_WAC_P”,“Supplier:”){{

width(width_label); height(“20px”); textHAlign(activity_label);

}});

panel(common.hspacer(“5px”));

control(new DropDownBuilder(“supplierValue_WAC_P”){{

width(width_value); height(“20px”); textHAlign(activity_value);

visibleToMouse(true); interactOnRelease(“categoryMouseOnRelease()”); }});

}});[/java]



and the method in java is:

[java]

public boolean categoryMouseOnRelease(){

return false;

}

[/java]



returning false or true, there is not any difference!!



In both controls the ‘release’ mouse event don’t consume the event, so it goes through the window and click in other stuff.

please anybody know how can I fix it?

This has been fixed, I think. see this comment on github for details → https://github.com/void256/nifty-gui/commit/2e8dca1d350de4cf000d569c5c98da76f28ece68



Not yet released and therefore not yet a part of jme builds tho. You could try a nightly Nifty build maybe.

1 Like

I think it is working right in the “press” event but not in “release” event. So the issue is not fixed yet, or maybe it has not been updated in any version because I updated the jmonkey and the issue remains

Please, any other idea about that?

1 Like

Jme does not have nifty 1.3.2 yet, hence it does not have that fix. You will have to wait a little bit for it to get in (probably a week or less).

2 Likes

ohh really??? only a week or less!!! great!!! thank you!!!

I’ll let you know as soon as I see the new release!!

Hello again,

Now I saw the issue in dropdown is solved, but now when I click in my WindowBuilder button, I mean in the ‘close button’. It closes in the ‘press event’ but in the ‘release event’ it triggers another event.

how can I fix that? because the ‘‘visibleToMouse()’’ method is not working.

please any idea?

thank you.

1 Like