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

Home » Public Forums » archive » Re: How to make menu GRAY?
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: How to make menu GRAY? [message #4170] Tue, 09 May 1995 00:00
rep2857 is currently offline  rep2857
Messages: 28
Registered: December 1994
Junior Member
In article <3ocaup$lmm@mirv.unsw.edu.au>,
Michael Feigin,ARC Research Fellow,AS,951231 <feigin@saturn.gas.unsw.EDU.AU> wrote:
>
> Dear colleagues,
>
> Does anyone know how to make GRAY (unavailable) points of a menu? I can't
> find it in the documentation. Meanwhile, it seems to be possible since system makes points of a main menu grayed when I call a modal dialog box.
> Any advice will be highly appreciated.
>

Use the "Widget_Control" command to do this. Assume you have a button
called data_button somewhere in your widget hierarchy declared like
this:

data_button = Widget_Button(base, Value='Data', UValue='data_button')

Just prior to realizing the widget hierarchy you can call the following
command to gray it out:

Widget_Control, data_button, Sensitive=0

During event processing you can call Widget_Control again and set the
"Sensitive" value to 1 to make the button available.

Widget_Control, data_button, Sensitive=1

Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@visdata.com Coromar Drive, M/S B28/87
Work: rep2857@sbsun0010.sbrc.hac.com Goleta, CA 93117
Contract Employee. Will visualize data for large amounts of money.
Re: How to make menu GRAY? [message #4181 is a reply to message #4170] Mon, 08 May 1995 00:00 Go to previous message
Ken Knighton is currently offline  Ken Knighton
Messages: 44
Registered: May 1995
Member
Michael Feigin writes:

> Does anyone know how to make GRAY (unavailable) points of a
> menu? I can't find it in the documentation.

Michael,

You seem to be referring to the sensitivity of a widget.

Use:

WIDGET_CONTROL, widget_id, SENSITIVE=0

This makes the widget insensitive to the user and under MOTIF
or WINDOWS and changes the appearance of the widget.

The widget can be resensitized by:

WIDGET_CONTROL, widget_id, /SENSITIVE

Yours truly,

Ken Knighton
Re: How to make menu GRAY? [message #4195 is a reply to message #4181] Fri, 05 May 1995 00:00 Go to previous message
nicholas is currently offline  nicholas
Messages: 22
Registered: January 1994
Junior Member
> Does anyone know how to make GRAY (unavailable) points of a menu? I can't
> find it in the documentation. Meanwhile, it seems to be possible since >system makes points of a main menu grayed when I call a modal dialog box.
> Any advice will be highly appreciated.

In PV-Wave you get the widget ID of the menu item and use it in a WwSet
to gray it out.
Example:


menuid = WwMenuBar(parent,items,Menus=menus)
itemids = WtGet(menus(i),/Child) ; i=menu from menubar
status = WtSet(itemids(j),/Nonsensitive) ; j=the index of item from
menu i

Hope this helps,
-Andy


----------------------------------
Andrew Nicholas
CPI onsite at Naval Research Lab
Code : 7640
(202) 767-9452 voice
(202) 404-8090 fax
nicholas@uap.nrl.navy.mil
-----------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to determine good tickmark formats?
Next Topic: Re: GETHELP.PRO source code

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

Current Time: Fri Oct 10 00:27:43 PDT 2025

Total time taken to generate the page: 1.01459 seconds