I am trying to develop a program that handles inputs in different tabs. This tabs shows and hides different panels.
I want to show different EditBoxes depending on what tab is shown.
The tabs, panels and EditBoxes are created outside main in void loadWidgets(tgui::Gui& gui)
This works if I create the buttons like this;
tgui::EditBox::Ptr editBoxModelName(*panel1, "modelName");
But if I do it like that I can't get the value in main from the editBox using;
tgui::EditBox::Ptr editBoxModelName = gui.get("modelName");
sf::String modelName = editBoxModelName->getText();
(Assertion failed: m_WidgetPtr != nullptr
If I use gui instead of *panel1 when I create my EditBox I can get the value, but of course the EditBox is shown on all my tabs.
How am I supposed to handle this?
I don't think I have to say that I am a beginner on this

Thanks in advance!