[Gambas-user] Menu.Group property???
Tobias Boege
tobiasboege01 at ...1601...
Wed Jul 11 17:04:24 CEST 2012
>
> Aha! Solved it by using an observer in the class that manages my
> dynamic menus.
>
> Gambas is such a thing of beauty. :-)
>
You can do it without an Observer, too. Observers duplicate events to there could be some overhead
with this solution (unless that behaviour is desired) - besides the memory used for the Observer
object: Just re-attach those objects that you want to 'Group' to their parents with the same event
name:
For Each hObj In myGroupObjs
Object.Attach(hObj, Object.Parent(hObj), sNewGroup)
Next
This could prevent former event handlers to interfere... (Just guessing. It's a matter of your
application)
Regards,
Tobi
More information about the User
mailing list