corrected wxComboBox validator behaviour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,8 +162,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if wxUSE_SPINBTN
|
#if wxUSE_SPINBTN && !defined(__WIN16__)
|
||||||
#ifndef __WIN16__
|
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
|
||||||
{
|
{
|
||||||
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
|
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
|
||||||
@@ -174,7 +173,6 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#if wxUSE_SLIDER
|
#if wxUSE_SLIDER
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
|
||||||
{
|
{
|
||||||
@@ -188,7 +186,6 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// string controls
|
// string controls
|
||||||
#if 1
|
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
|
||||||
{
|
{
|
||||||
wxButton* pControl = (wxButton*) m_validatorWindow;
|
wxButton* pControl = (wxButton*) m_validatorWindow;
|
||||||
@@ -198,18 +195,6 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
#if wxUSE_COMBOBOX
|
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
|
||||||
{
|
|
||||||
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
|
|
||||||
if (m_pString)
|
|
||||||
{
|
|
||||||
pControl->SetValue(*m_pString) ;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
#if wxUSE_CHOICE
|
#if wxUSE_CHOICE
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
|
||||||
{
|
{
|
||||||
@@ -229,6 +214,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
#if wxUSE_COMBOBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
|
||||||
{
|
{
|
||||||
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
|
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
|
||||||
@@ -246,6 +232,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
|
||||||
{
|
{
|
||||||
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
|
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
|
||||||
@@ -271,8 +258,7 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#if wxUSE_CHECKLISTBOX
|
#if wxUSE_CHECKLISTBOX && !defined(__WIN16__)
|
||||||
#ifndef __WIN16__
|
|
||||||
// array controls
|
// array controls
|
||||||
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
|
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
|
||||||
// MUST come first:
|
// MUST come first:
|
||||||
@@ -295,7 +281,6 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#if wxUSE_LISTBOX
|
#if wxUSE_LISTBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
|
||||||
{
|
{
|
||||||
@@ -314,10 +299,10 @@ bool wxGenericValidator::TransferToWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
; // to match the last 'else' above
|
||||||
|
|
||||||
// unrecognized control, or bad pointer
|
// unrecognized control, or bad pointer
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to transfer data from the window
|
// Called to transfer data from the window
|
||||||
|
Reference in New Issue
Block a user