Reset the position when auto-sizing toolbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1252,7 +1252,10 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
|
|||||||
|
|
||||||
void wxToolBar::UpdateSize()
|
void wxToolBar::UpdateSize()
|
||||||
{
|
{
|
||||||
|
wxPoint pos = GetPosition();
|
||||||
::SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
|
::SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
|
||||||
|
if (pos != GetPosition())
|
||||||
|
Move(pos);
|
||||||
|
|
||||||
// In case Realize is called after the initial display (IOW the programmer
|
// In case Realize is called after the initial display (IOW the programmer
|
||||||
// may have rebuilt the toolbar) give the frame the option of resizing the
|
// may have rebuilt the toolbar) give the frame the option of resizing the
|
||||||
|
Reference in New Issue
Block a user