Hello.
Is there a way to make the size of the Selector always the same?
I put some images of the selector as it appears at the beginning and when choosing the selection.
Always the same as what?
It has to be the same width as the main panel, and cover the black background.
I set one of TextField:
filterTextfield.setPreferredSize(new Vector3f(360f, 18f, 0f));
In the end I have solved it like this.
Selector<String> dropdown = new Selector<>( items );
myWindow.addChild(dropdown);
Vector3f dimens = myWindow.getPreferredSize();
Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize();
dimens2.setX( dimens.getX() );
dropdown.getPopupContainer().setPreferredSize( dimens2 );
2 Likes