X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fwx%2Fsrc%2FbbwxRadioButton.cxx;h=fed13e89d463834126593f8520968442d387db0b;hb=9834268e7f5831df43fb680b25206b05b873c94c;hp=779a2817c7cc56560c3fd26ceadf31a75c15df8e;hpb=a2e88c0fc09eded799eab29233e5e1ae569cf1e6;p=bbtk.git diff --git a/packages/wx/src/bbwxRadioButton.cxx b/packages/wx/src/bbwxRadioButton.cxx index 779a281..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(); -*/ - } //------------------------------------------------------------------------- @@ -300,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 } /** @@ -329,7 +271,6 @@ namespace bbwx RadioButtonWidget *w = new RadioButtonWidget( this, -// bbGetWxParent(), parent, bbGetInputIn() , bbtk::std2wx(bbGetInputTitle()),