Bonjours à tous,
J'ai un méga gros soucis, c'est le drame :
Alors j'ai un wxPanel qui dedant prend un wxStaticBoxSizer.
Dans le staticBoxSizer, j'ai mis un flexGridSizer de deux lignes.
Dans la première ligne se trouve un wxStaticBox avec trois bouttons radio.
Dans la deuxième ligne se trouve un objet à moi dérivé de wxPanel.
Dans cet objet à moi, lorsque je met juste un staticBoxSizer, l'application freeze dès que je touche à un boutton radio. Lorsqu'à la place je met un flexSizer, ça ne freeze pas... comprend rien.
Voilà pour le panneau que je vais insérer dans un autre
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 class monPanelSecondaire : public wxPanel { public: monPanelSecondaire(wxWindow* parent, wxWindowID id = wxID_ANY, wxPoint position = wxDefaultPosition, wxSizer size = wxDefaultSize, long style = 0, wxString name = ""); }; monPanelSecondaire::monPanelSecondaire(wxWindow* parent, wxWindowID id, wxPoint position, wxSize size, long style, const wxString name) : wxPanel(parent, wxID_ANY, position, size, style, name) { wxStaticBoxSizer* staticBoxSizer = new wxStaticBoxSizer(wxVERTICAL, this, "mon panel secondaire"); SetSizer(staticBoxSizer); }
Voilà, ça ressemble à ça.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 class monPanelPrincipal : public wxPanel { public: monPanelPrincipal (wxWindow* parent, wxWindowID id = wxID_ANY, wxPoint position = wxDefaultPosition, wxSizer size = wxDefaultSize, long style = 0, wxString name = ""); }; monPanelPrincipal::monPanelPrincipal(wxWindow* parent, wxWindowID id, wxPoint position, wxSize size, long style, const wxString name) : wxPanel(parent, wxID_ANY, position, size, style, name) { wxStaticBoxSizer* staticBoxSizer = new wxStaticBoxSizer(wxVERTICAL, this, "mon panel principal"); wxBoxSizer* boxSizer = new wxBoxSizer(wxVERTICAL); wxRadioButton* b1 = new wxRadioButton(this, wxID_ANY, "bouton1"); boxSizer->Add(b1); wxRadioButton* b1 = new wxRadioButton(this, wxID_ANY, "bouton1"); boxSizer->Add(b2); wxRadioButton* b1 = new wxRadioButton(this, wxID_ANY, "bouton1"); boxSizer->Add(b3); staticBoxSizer->Add(boxSizer); wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL); MonPanelSecondaire* panel2 = new MonPanelSecondaire(this); boxSizer2->Add(panel2); staticBoxSizer->Add(boxSizer2); SetSizer(staticBoxSizer); }
Et donc là dès que je touche à un des boutons radio, ça freeze je ne peux plus rien faire à part stopper le débogage dans visual studio.
Et si dans monPanelSecondaire à la place de mettre un wxStaticBoxSizer je met un wxFlexGridSizer, ça passe niquel....
Y'a des règles a suivres concernant les bouton radio et les static box?
J'vais encore faire quelque tests.
Merci
A bientôt
Partager