Applied [ 799292 ] wxWizard and Validator Bug and Fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,6 +74,20 @@ public:
|
|||||||
// wxNullBitmap from here - the default one will be used then.
|
// wxNullBitmap from here - the default one will be used then.
|
||||||
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
||||||
|
|
||||||
|
/// Override the base functions to allow a validator to be assigned to this page.
|
||||||
|
bool TransferDataToWindow()
|
||||||
|
{
|
||||||
|
return GetValidator() ? GetValidator()->TransferToWindow() : wxPanel::TransferDataToWindow();
|
||||||
|
}
|
||||||
|
bool TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
return GetValidator() ? GetValidator()->TransferFromWindow() : wxPanel::TransferDataFromWindow();
|
||||||
|
}
|
||||||
|
bool Validate()
|
||||||
|
{
|
||||||
|
return GetValidator() ? GetValidator()->Validate(this) : wxPanel::Validate();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of ctors:
|
// common part of ctors:
|
||||||
void Init();
|
void Init();
|
||||||
@@ -222,6 +236,13 @@ public:
|
|||||||
virtual bool HasPrevPage(wxWizardPage *page)
|
virtual bool HasPrevPage(wxWizardPage *page)
|
||||||
{ return page->GetPrev() != NULL; }
|
{ return page->GetPrev() != NULL; }
|
||||||
|
|
||||||
|
/// Override these functions to stop InitDialog from calling TransferDataToWindow
|
||||||
|
/// for _all_ pages when the wizard starts. Instead 'ShowPage' will call
|
||||||
|
/// TransferDataToWindow for the first page only.
|
||||||
|
bool TransferDataToWindow() { return true; }
|
||||||
|
bool TransferDataFromWindow() { return true; }
|
||||||
|
bool Validate() { return true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_NO_COPY_CLASS(wxWizardBase)
|
DECLARE_NO_COPY_CLASS(wxWizardBase)
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user