Hello everybody,
How can i use a wxFileDialog with wxSmith?
I want it to open when a Button "Load" was clicked. When I create a FileDialog I see it as a tool, but how can link it to the Button.
thank you,
coeps
In the handler procedure for the button write something like this:
void SomeDialog::OnButton1Click(wxCommandEvent& event)
{
if ( FileDialog1->ShowModal() != wxID_OK ) return;
wxString FileName = FileDialog1->GetFilename();
if ( FileName.IsEmpty() ) return;
// FileName points to selected file
wxMessageBox( FileName );
}
Regards
BYO