or equivalent function should now be done into wxApp::OnEventLoopEnter().
See wxApp::OnEventLoopEnter() and wxApp::OnEventLoopExit() docs for more info.
+- wxLoadFileSelector() now allows the user to select existing files only.
+
Changes in behaviour which may result in compilation errors
-----------------------------------------------------------
wxString filename;
#if wxUSE_FILEDLG
- filename = wxFileSelector(_T("Select image file"));
+ filename = wxLoadFileSelector(_T("image"), wxEmptyString);
if ( !filename.empty() )
{
if ( !image.LoadFile(filename) )
void MyFrame::OnThumbnail( wxCommandEvent &WXUNUSED(event) )
{
#if wxUSE_FILEDLG
- wxString filename = wxFileSelector(_T("Select image file"));
+ wxString filename = wxLoadFileSelector(_T("image"), wxEmptyString, wxEmptyString, this);
if ( filename.empty() )
return;
void MyFrame::OnToolbarCustomBitmap(wxCommandEvent& WXUNUSED(event))
{
- m_pathBmp = wxFileSelector(_T("Custom bitmap path"));
+ m_pathBmp = wxLoadFileSelector(_T("custom bitmap"));
RecreateToolbar();
}
wxBitmap BitmapComboBoxWidgetsPage::QueryBitmap(wxString* pStr)
{
- wxString filepath = wxFileSelector(wxT("Choose image file"),
+ wxString filepath = wxLoadFileSelector(wxT("image"),
wxEmptyString,
wxEmptyString,
- wxEmptyString,
- wxT("*.*"),
- wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this);
wxBitmap bitmap;
}
return wxFileSelector(prompt, wxEmptyString, default_name, ext, wild,
- load ? wxFD_OPEN : wxFD_SAVE, parent);
+ load ? (wxFD_OPEN | wxFD_FILE_MUST_EXIST) : wxFD_SAVE,
+ parent);
}
//----------------------------------------------------------------------------