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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| std::vector<wxBoxSizer*> itListSliders = mListSliders.begin() ;
for(;itListSliders != mListSliders.end();++ itListSliders)
{
Ec[idx_cur]-> GetSizer().Remove(* itListSliders);
}
wxBoxSizer* sizer_choice[profondeur[idx_cur]-3];
for(unsigned int i=0;i<m_choice[idx_cur]->GetSelection();i++)
{
sizer_choice[i] = new wxBoxSizer(wxHORIZONTAL);
wxSlider *slider_choice=new wxSlider(Ec[idx_cur],wxID_ANY,0,0,20,wxDefaultPosition,wxSize(120,40),wxSL_HORIZONTAL);
mapInd[slider_choice->GetId()]=i;
//Pour OnSliderUpdate...
mapSliders[slider_choice->GetId()] = slider_choice;
//
wxSpinCtrl* SpinCtrl_choice = new wxSpinCtrl(Ec[idx_cur],wxID_ANY,
_(""),
wxDefaultPosition, wxSize(40,20),
wxSP_ARROW_KEYS,
0,20,0);
mapSpinCtrl[slider_choice->GetId()] = SpinCtrl_choice;
mapCmp[SpinCtrl_choice->GetId()]=slider_choice->GetId();
sizer_choice[i]->Add(1, 1, 1, wxEXPAND);
sizer_choice[i]->Add(new wxStaticText(Ec[idx_cur], wxID_ANY, wxT("Value ") + wxString::FromAscii(tab_idx[idx_cur][i])),0,wxALL,10);
sizer_choice[i]->Add(slider_choice,0,wxALL,0);
sizer_choice[i]->Add(SpinCtrl_choice,0,wxALL,10);
sizer_choice[i]->Add(1, 1, 1, wxEXPAND);
sizer_choice[i]->SetItemMinSize((size_t)1, 50, 20);
mListSliders.push_back(sizer_choice[i]);
Ec[idx_cur]->GetSizer()->Add(sizer_choice[i]);
}
//Ec[idx_cur]->SetAutoLayout(TRUE);
Ec[idx_cur]->SetSizer(Ec[idx_cur]->GetSizer());
//Ec->GetSizer()->Fit(Ec);
Ec[idx_cur]->GetSizer()->SetSizeHints(Ec[idx_cur]); |
Partager