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:
Vadim Zeitlin
2000-07-19 07:20:03 +00:00
parent 3d68c787aa
commit 54355138d0

View File

@@ -162,8 +162,7 @@ bool wxGenericValidator::TransferToWindow(void)
}
} else
#endif
#if wxUSE_SPINBTN
#ifndef __WIN16__
#if wxUSE_SPINBTN && !defined(__WIN16__)
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -174,7 +173,6 @@ bool wxGenericValidator::TransferToWindow(void)
}
} else
#endif
#endif
#if wxUSE_SLIDER
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
{
@@ -188,7 +186,6 @@ bool wxGenericValidator::TransferToWindow(void)
#endif
// string controls
#if 1
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
{
wxButton* pControl = (wxButton*) m_validatorWindow;
@@ -198,18 +195,6 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
} 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 (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
{
@@ -229,6 +214,7 @@ bool wxGenericValidator::TransferToWindow(void)
}
} else
#endif
#if wxUSE_COMBOBOX
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
{
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
@@ -246,6 +232,7 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
} else
#endif
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
@@ -271,8 +258,7 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
} else
#if wxUSE_CHECKLISTBOX
#ifndef __WIN16__
#if wxUSE_CHECKLISTBOX && !defined(__WIN16__)
// array controls
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
// MUST come first:
@@ -295,7 +281,6 @@ bool wxGenericValidator::TransferToWindow(void)
return FALSE;
} else
#endif
#endif
#if wxUSE_LISTBOX
if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
{
@@ -314,10 +299,10 @@ bool wxGenericValidator::TransferToWindow(void)
}
} else
#endif
; // to match the last 'else' above
// unrecognized control, or bad pointer
return FALSE;
return FALSE;
}
// Called to transfer data from the window