Code: Select all
clToolBar *MyPlugin::CreateToolBar(wxWindow *parent)
{
	// Support both toolbars icon size
	int size = m_mgr->GetToolbarIconSize();
	clToolBar *tb(NULL);
	if (m_mgr->AllowToolbar())
	{
		tb = new clToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, clTB_DEFAULT_STYLE);
		tb->SetToolBitmapSize(wxSize(size, size));
		BitmapLoader *bitmapLoader = m_mgr->GetStdIcons();
		if (size == 24)
		{
			tb->AddTool(XRCID("generate_code"), wxT("Generate C code"), bitmapLoader->LoadBitmap(wxT("toolbars/24/myplugin/generate")), wxT("Generate C code"));
		}
		else
		{
			tb->AddTool(XRCID("generate_code"), wxT("Generate C code"), bitmapLoader->LoadBitmap(wxT("toolbars/16/myplugin/generate")), wxT("Generate C code"));
		}
		tb->Realize();
	}
	m_mgr->GetTheApp()->Connect(XRCID("generate_code"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MyPlugin::OnGenerate), NULL, (wxEvtHandler*)this);
	return tb;
} icon.
 icon.Here is the overly large toolbar:

Here is what happens when I try to move the CodeFormatter toolbar (visible all the way at the right) to the location of the thin black rectangle:

I'm clueless as to why this is happening.
