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

Re: Dynamic menus on base widget using MBAR



David Fanning wrote:
> Today, I went back and looked at the code more carefully.
> I think my original plan *was* to put it in a menu bar,
> but I had to modify my original plan. I'm guessing because
> it didn't work then.

This was the problem that a child of menu bar shared (forcefully) its
UVALUE with the menubar and the rest of menubar children. I think I
reported this for version 5.0 and was assured that such behavior was
beneficial for me. I forget what the explanation was, but I had no other
choice but to use buttons as top-level items on menu bar. Their Uvalues
were all the same, but you never use them. Menu items then could have
different Uvalues and be used in the most conventional way in event handlers.

> But I just tried it now (with the same Dynamic_Menu code
> on my web page) in a menu bar and it still works. I'm using
> IDL 5.3.1 on Windows NT 4.

I still use buttons as "insulators" between menubar and droplists of
menu items. It does work, although I am not sure if it is necessary anymore.
I use IDL 5.2 on a Mac. BTW, I have no system crashes when messing up
with widgets, including menu bars. Might be that faulty MacOS release,
you never know :-(
Cheers,
Pavel