+ MAX_RADIOBUTTON = lstIn.size();
+ wxPanel *panel = this;
+ int i;
+ long style=wxRB_GROUP;
+ for (i=0;i<MAX_RADIOBUTTON; i++)
+ {
+ if ( lstIn[i]!=_T(""))
+ {
+ //---------------------------------------------------------------------
+ // 1) Creation of the components of the widget
+ // Any top level sub-widget must have the panel returned by panel
+ // for parent
+ mwxRadioButton[i] = new wxRadioButton( panel, -1, lstIn[i],wxDefaultPosition, wxDefaultSize, style);
+ style=0;
+ if (In==i)
+ {
+ mwxRadioButton[i]->SetValue(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;i<MAX_RADIOBUTTON; i++)
+ {
+ if (mwxRadioButton[i]!=NULL)
+ {
+ sizer->Add( mwxRadioButton[i],1,wxGROW );
+ }
+ }
+ sizer->AddGrowableCol(0);
+ panel->SetSizer(sizer);
+
+// panel->SetAutoLayout(true);
+// panel->Layout();