The Boa GUI designer when working with a gridbagsizer does:
gbs.GetChildren() this returns a list of wxGBSizerItem
I just tested this and it works in 2.8.4.0, however when I try it with 2.8.7.1 I get an exception.
Problem seems that gbs.GetChildren() returns wx.SizerItem instead of wxGBSizerItem.
I guess that this was introduced in 2.8.4.2 by the change listed first "Added some SWIG magic that allows wx C++ lists to be exposed to wxPython as sequence-like wrappers around the real list,.....".
If my guess is correct is there a way to get the wxGBSizerItem?
Werner
Thursday, April 3, 2008, 9:00:54 AM, E. A. Tacao wrote:
Thursday, April 3, 2008, 3:59:24 AM, Werner F. Bruhin wrote:
The Boa GUI designer when working with a gridbagsizer does:
gbs.GetChildren() this returns a list of wxGBSizerItem
I just tested this and it works in 2.8.4.0, however when I try it with
2.8.7.1 I get an exception.
Problem seems that gbs.GetChildren() returns wx.SizerItem instead of
wxGBSizerItem.
I guess that this was introduced in 2.8.4.2 by the change listed first
"Added some SWIG magic that allows wx C++ lists to be exposed to
wxPython as sequence-like wrappers around the real list,.....".
If my guess is correct is there a way to get the wxGBSizerItem?
I also noticed that change and I´m currently using the following
workaround to fetch the wxGBSizerItems:
# my_gbs is the GridBagSizer in question
windows = my_gbs.GetContainingWindow().GetChildren()
gbsizeritems =
for window in windows:
item = self.FindItem(window)
gbsizeritems.append(item)
# now gbsizeritems is a list of wxGBSizerItems...
The code above has an error. Replace the line
item = self.FindItem(window)
to
item = my_gbs.FindItem(window)
-- tacao
No bits were harmed during the making of this e-mail.