home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!think.com!paperboy.osf.org!paperboy!drand
- From: drand@spinner.osf.org (Douglas S. Rand)
- Subject: Re: popping up a PopupMenu using Btn1
- In-Reply-To: tom@teal.csn.org's message of 25 Jan 93 16:07:22 GMT
- Message-ID: <DRAND.93Jan25154536@spinner.osf.org>
- Sender: news@osf.org (USENET News System)
- Organization: Open Software Foundation
- References: <C14G2D.Gvu@csn.org> <1993Jan22.160053.24231@unislc.uucp>
- <DRAND.93Jan22174724@spinner.osf.org> <C1F3GC.G7L@csn.org>
- Date: 25 Jan 93 15:45:36
- Lines: 38
-
- In article <C1F3GC.G7L@csn.org> tom@teal.csn.org (Tom Schutter) writes:
-
- > Naughty, naughty, playing with a widget's privates :) . Seriously,
- > don't do this. This is not the only thing which must happen. That is
- > why there is a data abstraction layer between you and the widget
- > internals.
-
- But if the widget is not providing the functionality required, sometimes you
- gotta break the rules.
-
- Does OSF have an answer as to why the XmNmenuPost resource does not work?
-
- It depends what your question is. XmNmenuPost does work. If the
- RowColumn had menuPost set for button1, and was posted with button1
- then button1 would unpost it. Now a different argument is whether
- the menu should also come down on other button presses.
-
- To post a popup menu one needs to:
-
- 1) Set popupEnabled on the popup menu
-
- 2) Set menuPost to the event specification that the menu will be posted
- on (very important, lots of hand waving behind the screen).
-
- 3) Set an event handler on the posting widget which manages the menu
- on the appropriate event.
-
- If steps 1, 2 and 3 are followed, you should get proper behavior.
-
- Now, in a future release, you'll just have to set popupEnabled to
- a magic value and step 3 will happen for you. But for now, you
- have to set it yourself.
-
- --
- Douglas S. Rand <drand@osf.org> OSF/Motif Dev.
- Snail: 11 Cambridge Center, Cambridge, MA 02142
- Disclaimer: I don't know if OSF agrees with me... let's vote on it.
- Amateur Radio: KC1KJ
-