wxToolBar::GetToolSize() broken on wxGTK2.8.6?
Volker Bartheld
dr_versaeg at freenet.de
Thu Oct 11 00:39:51 PDT 2007
> I now use
> wxSize
> tbarsize=m_toolbook->GetToolBar(), // get size of toolbook's toolbar member
> tbooksize=m_toolbook->GetSize(), // get size of toolbook itself
> minSize(std::max<int>(tbooksize.x, tbarsize.x), std::max<int>(tbooksize.y, tbarsize.y)); // new minimal size
> m_toolbook->SetMinSize(minSize);
Should have been
m_toolbook->Fit(); // fit toolbook around its pages
wxSize
tbarsize=m_toolbook->GetToolBar()->GetSize(), // get size of toolbook's toolbar member
tbooksize=m_toolbook->GetSize(), // get size of toolbook itself
minSize(std::max<int>(tbooksize.x, tbarsize.x), std::max<int>(tbooksize.y, tbarsize.y)); // new minimal size
m_toolbook->SetMinSize(minSize);
Sorry.
V.
--
mailto: V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list