comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Dynamic menus on base widget using MBAR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Dynamic menus on base widget using MBAR [message #21143] Thu, 10 August 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ricardo Fonseca (zamb@physics.ucla.edu) writes:

> Is there a way to dynamically change the menu on a base widget? When I begin
> my program I create a menu using the MBAR keyword on the WIDGET_BASE
> function. While it is running, and depending on user input, I'd like to
> change the menu to a completely different one.
>
> So far I've attempted to destroy the old button widgets and regenerating the
> menu, but it's not working.

I wrote an article about how to do this and put it on my
web page:

http://www.dfanning.com/tips/dynamic_menus.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Dynamic menus on base widget using MBAR [message #21144 is a reply to message #21143] Thu, 10 August 2000 00:00 Go to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
I tried this on UNIX and failed miserably. I asked RSI about it about a
year ago, and was told it is a bug, and that they filed it. I have no
idea if it has been fixed. I recently tried just deactivating menu items
using Sensitive=0, and it does work, but I had strange side effects.
When I deactivate a menu item and call another widget application from
the one with menu, then I can not re-activate the menu item later on
after I kill the daughter process. When I repetitively call daugter
process, I regain the ability to activate or deactivate menu or might
lose it again. I forsee David putting money on a programmer's error, but
the whole program is so small that I hardly agree to that. I might be
missing some Xmanager trick, but both widgets are called just with
/No_block, and that's it. Also, why would it only affect menus? All
other widgets work just fine.
Maybe, you can try to just change Value and Uvalue of menu items without
killng and replacing them?
Cheers,
Pavel

Ricardo Fonseca wrote:
>
> Hi All
>
> Is there a way to dynamically change the menu on a base widget? When I begin
> my program I create a menu using the MBAR keyword on the WIDGET_BASE
> function. While it is running, and depending on user input, I'd like to
> change the menu to a completely different one.
>
> So far I've attempted to destroy the old button widgets and regenerating the
> menu, but it's not working.
>
> Any Ideas?
>
> Thanks in advance, Ricardo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: transparent GIF pixels
Next Topic: Re: Selecting objects and PickData problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 15:44:20 PST 2025

Total time taken to generate the page: 1.51989 seconds