Updating tab-captions on runtime - how does it work exactly?


i’m currently facing the problem that i want to rename the caption of tabs on runtime. This seems to work if the screen containing the tabs was never openend before, but if it was opened before changing the caption it will not work no matter what. I called setcaption() from inside the screencontroller, timed from a completely different class, and it’s always the same. Maybe i have a fundamental understanding issue here, some enlightenment would be great :slight_smile:

This is the java-code i use to change it:

[java]nifty.getScreen(“options”).findControl(“tab_1”, TabControl.class).setCaption(“testing”);[/java]

Did you try element.layoutElements() on the parent to the control element?