OptionMenu and Menu questions

I have a couple of questions:

1) I am creating a main menu using the item factory method, which
works great. I now need to dynamically build a top level menu and
insert it into that main menu. For instance, currently I have "File"
and "View" items which are built from the item factory. I will like to 
add another menu, "Queries" which I build dynamically whenever
needed. I would prefer to do this at the last moment, i.e. as soon as
the menu widget needs to draw the menu. Is this possible? Any
suggested strategies?

2) I need a signal when the user finishes selecting an item in an
Option Menu. I have in the past attached a signal handler to the
'activate' signal of each item in the option menu. But this is
tedious. All I really want to know is when the user has finished
changing the selection, and then in my signal handler ask the option
menu what its [possibly] new selected item is.

Thanks for any help!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]