+bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu)
+{
+ wxToolBarToolBase * const tool = FindById(toolid);
+ wxCHECK_MSG( tool, false, _T("invalid tool id") );
+
+ wxCHECK_MSG( tool->GetKind() == wxITEM_DROPDOWN, false,
+ _T("menu can be only associated with drop down tools") );
+
+ tool->SetDropdownMenu(menu);
+
+ return true;
+}
+