If you create a toolbar in a MDIParentFrame, and then set the Position of any MDIChildFrame, that Position will end up being offset by the same amount as the height of the toolbar.
if tb:
print "Toolbar height:", tb.Size[1]
print "cf top:", cf.Position[1]
app.MainLoop()
}}}
The child frame gets placed at (50,0) as expected. Now, uncomment the creation of the toolbar, and the child frame gets placed at (50,28) leaving a gap between the bottom of the toolbar and the child frame.
There must be code somewhere that assumes we need to account for the toolbar height when in fact we don't?
If you create a toolbar in a MDIParentFrame, and then set the Position of any MDIChildFrame, that Position will end up being offset by the same amount as the height of the toolbar.
if tb:
print "Toolbar height:", tb.Size[1]
print "cf top:", cf.Position[1]
app.MainLoop()
}}}
The child frame gets placed at (50,0) as expected. Now, uncomment the creation of the toolbar, and the child frame gets placed at (50,28) leaving a gap between the bottom of the toolbar and the child frame.
This bug has been around for a long time, but I'm not sure if a ticket has been created for it or not. You may want to search for it at trac.wxwidgets.org and create a bug report if you can't find one there already.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!