home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!ulowell!koverber
- From: koverber@cs.ulowell.edu (Kurt Overberg)
- Subject: Re: How can I make Drawing Area invisible?
- Message-ID: <BzM853.1Gy@ulowell.ulowell.edu>
- Originator: koverber@bigmax.ulowell.edu
- Sender: usenet@ulowell.ulowell.edu (News manager - ulowell)
- Organization: University of Massachusetts at Lowell Computer Science
- References: <TERO.92Dec19203824@vipunen.hut.fi>
- Distribution: comp
- Date: Mon, 21 Dec 1992 15:24:38 GMT
- Lines: 49
-
-
-
- 1) I can't really think of anyway to make a drawing area invisible.
- I have never seen it done, and am not sure it is possible. If I were
- to guess HOW to do it, perhaps you could hack access to the server's
- backing store pixmap, and figure out which part of that should
- be visible in your window. In any event, it would probably require
- a lot of very low level X hacking. Ugh.
-
- 2) All you need is the widget ID of the push button in the menu structure.
- You could either declare it as a global (not a good idea), or use
- XtNameToWidget. Example: your pushbutton in your menu structure is called
- "RulerOption". Note: NOT the variable name. This is the WIDGET name. It is
- the first parameter in XtVaCreateManagedWidget. You need to know the Widget ID
- this button's parent. Example:
-
- {
- Widget localWidgetVariable;
-
- localWidgetVariable = XtVaCreateManagedWidget("RulerHiddenOrShown",
- parent_form, /* parent */
- ...
- ...
- }
-
- *now we are in an entirely different part of program where 'localWidgetVariable'
- is not visible, but parent_form IS visible*
-
- {
- Widget tmp;
- XmString str;
-
- tmp = XtNameToWidget(parent_form, "RulerHiddenOrShown");
-
- /* now, tmp contains the widget ID of your menu item */
-
- str = XmStringCreateLtoR("Hide Ruler", XmSTRING_DEFAULT_CHARSET);
-
- XtVaSetValues(tmp,
- XmNlabelString, str,
- NULL);
- /* This will change the string of our menu item */
- }
-
- --
- Kurt Overberg | Opinions expressed here are MINE!
- U of Mass, Lowell | "Poke a double-decker on a Llama taboot,
- koverber@cs.ulowell.edu | Llama taboot, taboot!" -Phish
-
-