I have a radiobox with 2 options: 1 robot or 2 robots.
and i need to open a certain frame if option 1 is checked and open a different frame if option 2 is checked.
so what do i have to use to get that?
like...
like.. when the program starts, a dialog opens.. so there u have 2 options, u are gonna choose one e click OK..
now that dialog closes (i forgot about that.. i didnt make it to close yet) and it opens the frame!
does it have to be modal?? if yes, how can i do that? or if i want to be modal, i have to use a wxdialog?
No, it doesn't have to be Modal. If you want to do what you describe, maybe you should have a member variable in your
application and create the frame using new in your dialog.
//declared in myApp?
JuntasFrm* myJuntasFrm;
void RobotsDlg::btnOKClick(wxCommandEvent& event)
{
// insert your code here
int GetSelection();
if (rdbNumRobots->GetSelection() == 0)
{
myJuntasFrm = new JuntasFrm(this);
myJuntasFrm->Show();
}
)
void RobotsDlg::btnOKClick(wxCommandEvent& event)
{
// insert your code here
JuntasFrm* myJuntasFrm;
JuntasUmFrm* myJuntasUmFrm;
int GetSelection();
if (rdbNumRobots->GetSelection() == 1)
{
myJuntasFrm = new JuntasFrm(this);
myJuntasFrm->Show();
}
else
{
myJuntasUmFrm = new JuntasUmFrm(this);
myJuntasUmFrm->Show();
}
Destroy();
}
And that thing still happens: the frames show up, but disappear in a fraction of seconds =(
Do u know what is still wrong?
Thanks for the help until now!