michael h
unread,Aug 28, 2009, 11:42:22 AM8/28/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wxPython-dev
I've encounter a previously reported bug (read at the bottom of this
message) while trying to use AddControl with an AuiToolbar...
Poking around in auibar.py i tried replacing:
sizer_item.SetMinSize(min_size)
ctrl_sizer_item.SetMinSize(min_size)
with:
sizer.SetItemMinSize(sizer_item, min_size)
sizer.SetItemMinSize(ctrl_sizer_item, min_size)
which threw the error:
TypeError: wx.Window, wx.Sizer or int (position) expected for item
(shouldn't it expect a wx.SizerItem?)
Then I decided to see what would happen if I just commented out the
lines, and everything worked fine... Am I missing something? I know
the source says:
# proportional items will disappear from the toolbar
if
# their min width is not set to something really small
It doesn't appear that the toolbar is suffering any ill effects unless
I'm missing something (which is very likely).
Can anyone comment on any of this?
- Michael
Here's the bug report:
#11089: wxAUIToolBar crash after adding custom control
---------------------------------------
+------------------------------------
Reporter: spom | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 2.9-svn
Keywords: wxAUIToolBar ITEM_CONTROL | Blockedby:
Patch: 0 | Blocking:
---------------------------------------
+------------------------------------
Trying to add a ComboCtrl or similar custom control to the
wxAUIToolBar by
using AddControl(...) leading to the following runtime error:
File "/usr/lib64/python2.6/site-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/auibar.py", line 2837, in
Realize
sizer_item.SetMinSize(min_size)
AttributeError: 'SizerItem' object has no attribute 'SetMinSize'