So... I've moved the code from the dialog to the main program and set the buttons as a stddialogbuttonsizer. Show it just magically remember my variables? How do I refer to them then?
I've already looked at the docs for wxdialog but it only refers to simple ok/cancel situations and not to something where someone is using 2 wxtextctrl inputs.
Code:
void _labelguiFrame::OnButton4Click(wxCommandEvent& event)
{
CustomSizeDialog dialog(this);
dialog.ShowModal();
if ( dialog.ShowModal() == wxID_OK ) {
wxString dimx = TextDimX->GetValue();
wxString dimy = TextDimY->GetValue();
int dimxn = wxAtoi(dimx);
int dimyn = wxAtoi(dimy);
wxString dimcust;
dimcust += dimx + wxT(" x ") + dimy;
}
//else: dialog was cancelled or some another button pressed
}
gives:
error: `TextDimX' was not declared in this scope|
error: `TextDimY' was not declared in this scope|
I still don't understand how I'm supposed to pass them from the dialog to the main program.