void OnUpdateDelete(wxUpdateUIEvent& event);
void OnUpdateSelectAll(wxUpdateUIEvent& event);
+protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+#if wxUSE_TOOLTIPS
+ virtual void DoSetToolTip(wxToolTip *tip);
+#endif
+
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
DECLARE_EVENT_TABLE()
event.Enable(IsEditable() && GetLastPosition() > 0);
}
+#if wxUSE_TOOLTIPS
+
+void wxComboBox::DoSetToolTip(wxToolTip *tip)
+{
+ wxChoice::DoSetToolTip(tip);
+
+ if ( tip && !HasFlag(wxCB_READONLY) )
+ tip->Add(GetEditHWND());
+}
+
+#endif // wxUSE_TOOLTIPS
+
#endif // wxUSE_COMBOBOX
#include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
#include "wx/app.h"
#include "wx/control.h"
- #include "wx/combobox.h"
#endif
#include "wx/tokenzr.h"
Add(m_window->GetHWND());
}
#if !defined(__WXUNIVERSAL__)
- // and all of its subcontrols (e.g. radiobuttons in a radiobox) as well
+ // and all of its subcontrols (e.g. radio buttons in a radiobox) as well
wxControl *control = wxDynamicCast(m_window, wxControl);
if ( control )
{
Add((WXHWND)hwnd);
}
}
-
- // VZ: it's ugly to do it here, but I don't want any major changes right
- // now, later we will probably want to have wxWindow::OnGotToolTip() or
- // something like this where the derived class can do such things
- // itself instead of wxToolTip "knowing" about them all
- wxComboBox *combo = wxDynamicCast(control, wxComboBox);
- if ( combo )
- {
- WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY
- ? combo->GetHWND()
- : combo->GetEditHWND();
- if ( hwndComboEdit )
- {
- Add(hwndComboEdit);
- }
- }
#endif // !defined(__WXUNIVERSAL__)
}