QuoteSoYou are doing something with a null pointer. At first I was a bit surprised because I though this crash came from inside tgui, but I think the problem lies in your scrollbarValueChanged function.Code Selecttgui::Scrollbar::Ptr scrollbar(*Group1);
Doesnt work, when i change values of scrollbar [with mouse or mouse scroll] program crashes withCode Select/usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Do you have code like "gui->get("Scrollbar")" there or something like that?
Because what I notice is that when you pass 'gui' to it you also give the widget a name, but when you pass '*Group1' to it you don't give it a name.
So if it is the problem that I suspect than you just need "tgui::Scrollbar::Ptr scrollbar(*Group1, "Scrollbar");".
Although I don't see why the scrollbar should be inside the panel instead of just in the gui.
Quoteexcept i see scrollbar in panel where i dont need scrollbarWhat exactly do you mean with this?
QuoteNeed to figure out how to access each editBoxes to read it values, and to modify them.You can get them back later with the get function on your Group1.
But make sure all widgets have unique names.
If you are still creating the pictures as before then you are going to get name conflicts.
You are calling your pictures "1", "2", "3", "4", ...
But you are also calling your edit boxes "1", "2", "3", "4", ...
So maybe you should write
Code (cpp) Select
tgui::EditBox::Ptr Name(*Group1, "EditBox" + tgui::to_string(i));Like this, your edit boxes will be named "EditBox1", "EditBox2", "EditBox3", ...
And you can get them from Group1 later with this name.
If you would have two widgets with the same name then getting them from Group1 will only give you the first occurence (first added widget with that name), and it will be impossible to access the other widget.