X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fwx%2Fsrc%2FbbwxRadioButton.cxx;h=fed13e89d463834126593f8520968442d387db0b;hb=9834268e7f5831df43fb680b25206b05b873c94c;hp=8ff7751aeeb00911f08b3e5c6e9077b154ea3f64;hpb=3f88d1b429d99eca0b5ca0627063e1d08fadefd6;p=bbtk.git diff --git a/packages/wx/src/bbwxRadioButton.cxx b/packages/wx/src/bbwxRadioButton.cxx index 8ff7751..fed13e8 100644 --- a/packages/wx/src/bbwxRadioButton.cxx +++ b/packages/wx/src/bbwxRadioButton.cxx @@ -90,64 +90,6 @@ namespace bbwx mBox(box) { -/* - MAX_RADIOBUTTON = lstIn.size(); - wxPanel *panel = this; - int i; - long style=wxRB_GROUP; - for (i=0;iSetValue(true); - } else { - mwxRadioButton[i]->SetValue(false); - } - Connect( mwxRadioButton[i]->GetId(), - wxEVT_COMMAND_RADIOBUTTON_SELECTED, - (wxObjectEventFunction) - (void (wxPanel::*)(wxEvent&)) - &RadioButtonWidget::OnRadioButton ); - } else { - mwxRadioButton[i]=NULL; - } // if - } // for - - //--------------------------------------------------------------------- - // 2) Insertion of the components in the window - - // We use a FlexGridSizer - -//EED 2018-04-18 -// wxFlexGridSizer *sizer = new wxFlexGridSizer(1); - sizer = new wxFlexGridSizer(1); - - if (title!=_T("")) - { - sizer->Add( new wxStaticText(panel,-1, title ) ); - } - for (i=0;iAdd( mwxRadioButton[i],1,wxGROW ); - } - } - sizer->AddGrowableCol(0); - panel->SetSizer(sizer); - -// panel->SetAutoLayout(true); -// panel->Layout(); -*/ - } //------------------------------------------------------------------------- @@ -241,10 +183,8 @@ namespace bbwx sizer->AddGrowableCol(0); panel->SetSizer(sizer); -// panel->SetAutoLayout(true); -// panel->Layout(); - - + panel->SetAutoLayout(true); + panel->Layout(); } @@ -302,11 +242,11 @@ namespace bbwx lstIn.push_back( bbtk::std2wx(bbGetInputIn7()) ); lstIn.push_back( bbtk::std2wx(bbGetInputIn8()) ); lstIn.push_back( bbtk::std2wx(bbGetInputIn9()) ); - - - ( (RadioButtonWidget*)bbGetOutputWidget() )->AddElements(lstIn, bbGetInputIn() , bbtk::std2wx(bbGetInputTitle()) ); - - + + if (bbGetOutputWidget()!=NULL) + { + ( (RadioButtonWidget*)bbGetOutputWidget() )->AddElements(lstIn, bbGetInputIn() , bbtk::std2wx(bbGetInputTitle()) ); + } // if bbGetOutputWidget } /** @@ -331,7 +271,6 @@ namespace bbwx RadioButtonWidget *w = new RadioButtonWidget( this, -// bbGetWxParent(), parent, bbGetInputIn() , bbtk::std2wx(bbGetInputTitle()),