]> Creatis software - bbtk.git/commitdiff
#3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 10 Aug 2018 09:48:14 +0000 (11:48 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Fri, 10 Aug 2018 09:48:14 +0000 (11:48 +0200)
packages/wx/src/bbwxComboBox.cxx

index 8b2ea6479994078fb7d8d89022cd8f34382064ab..d0872ddff2a4cd4edf56b35c8efb347217e7dc49 100644 (file)
@@ -54,7 +54,7 @@ namespace bbwx
                        int sizeY
                )
     :
-    wxPanel( parent, -1,wxDefaultPosition,wxSize(sizeX,sizeY) ) ,
+    wxPanel( parent, -1,wxDefaultPosition ) ,
     mBox(box),
     mTypeForm(typeForm)
   {
@@ -71,8 +71,6 @@ namespace bbwx
     {
           sizer->Add( new wxStaticText(panel,-1,  bbtk::std2wx(title) ) ); 
     }
-    sizer->AddGrowableCol(0);
-    panel->SetSizer(sizer);
     //---------------------------------------------------------------------
        if (mTypeForm==1)
        {
@@ -82,12 +80,16 @@ namespace bbwx
                Connect( wxlistbox->GetId(), 
                  wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction) (void (wxPanel::*)(wxEvent&))&ComboBoxWidget::OnComboBox ); 
        } else if (mTypeForm==0) {
-               wxChoice *wxchoice = new wxChoice ( panel , -1 );
+               wxChoice *wxchoice = new wxChoice ( panel , -1);
                itemcontainer=wxchoice;
                sizer->Add( wxchoice,1,wxGROW ); 
+
                Connect( wxchoice->GetId(), 
                  wxEVT_COMMAND_CHOICE_SELECTED, (wxObjectEventFunction) (void (wxPanel::*)(wxEvent&))&ComboBoxWidget::OnComboBox ); 
        }
+    sizer->AddGrowableCol(0);
+    panel->SetSizer(sizer);
+       
        for (i=0;i<lstIn.size(); i++)
        {
                itemcontainer->Append(  bbtk::std2wx( lstIn[i] )  );