fix for assert when setting tooltip for a readonly combo (backported from the main branch)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -382,12 +382,13 @@ void wxToolTip::SetWindow(wxWindow *win)
|
|||||||
wxComboBox *combo = wxDynamicCast(control, wxComboBox);
|
wxComboBox *combo = wxDynamicCast(control, wxComboBox);
|
||||||
if ( combo )
|
if ( combo )
|
||||||
{
|
{
|
||||||
WXHWND hwndComboEdit = combo->GetEditHWND();
|
WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY
|
||||||
|
? combo->GetHWND()
|
||||||
|
: combo->GetEditHWND();
|
||||||
if ( hwndComboEdit )
|
if ( hwndComboEdit )
|
||||||
{
|
{
|
||||||
Add(hwndComboEdit);
|
Add(hwndComboEdit);
|
||||||
}
|
}
|
||||||
//else: it's ok for a combo to be read only, of course
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user