doublemax wrote: ↑Sat Nov 26, 2022 1:34 pm
I didn't say it was impossible, i just said that you can't create the GUI elements in a secondary thread.
You can create the panel, just put a "loading" text onto it and display it. Then you start the thread that gathers the information from the internet. When the thread is done, you send this data to the main thread which replaces the "Loading" content on the panel with the new content.
the structure is somehow not the one you will make like that, this is the code:
Code: Select all
noteBookPanel::noteBookPanel(wxWindow * parent) : wxPanel(parent)
{
panelSizer = new wxGridSizer(3,3,3,3);
applicationOne = new applicationPanel(this,wxBORDER_THEME);
applicationTwo = new applicationPanel(this,wxBORDER_THEME);
applicationThree = new applicationPanel(this,wxBORDER_THEME);
applicationFour = new applicationPanel(this,wxBORDER_THEME);
applicationFive= new applicationPanel(this,wxBORDER_THEME);
applicationSex = new applicationPanel(this,wxBORDER_THEME);
applicationSeven = new applicationPanel(this,wxBORDER_THEME);
applicationEight = new applicationPanel(this,wxBORDER_THEME);
applicationNine = new applicationPanel(this,wxBORDER_THEME);
panelSizer->Add(applicationOne,1,wxEXPAND,wxALL);
panelSizer->Add(applicationTwo,1,wxEXPAND,wxALL);
panelSizer->Add(applicationThree,1,wxEXPAND,wxALL);
panelSizer->Add(applicationFour,1,wxEXPAND,wxALL);
panelSizer->Add(applicationFive,1,wxEXPAND,wxALL);
panelSizer->Add(applicationSex,1,wxEXPAND,wxALL);
panelSizer->Add(applicationSeven,1,wxEXPAND,wxALL);
panelSizer->Add(applicationEight,1,wxEXPAND,wxALL);
panelSizer->Add(applicationNine,1,wxEXPAND,wxALL);
}
as you can see i call applicationPanel 9 times, and i just don't know how to make all that stuff working