Hey guys,
I think that the way dabo refreshes the form needs to be re-visited.
I am using DynamicVisible on objects that are often many levels down from
the form (objects in a sizer in a page in a pageframe in a gridsizer in a
sizer in a page in a pageframe in a gridsizer in a page in a pageframe on
the form (phew)...for example). What I think is going on is that when the
DynamicVisible changes from False to True, the Form's layout event has
already fired.
After much thrashing, I found that this seems to work...
In dPemMixin I issued added a call to the parent's layout...
def __updateObjectDynamicProps(self, obj):
for prop, func in obj._dynamic.items():
if isinstance(func, tuple):
args = func[1:]
func = func[0]
else:
args = ()
setattr(obj, prop, func(*args))
#LAL
if prop=='Visible':
try:
obj.Parent.layout()
except:
pass
I haven't considered the other Dynamics that can affect the Sizer, but what
do you think about this solution?
Thanks,
Larry
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]