[comp.windows.x.motif] Accelerators for non-menu XmPushButton

cm@jet.uucp (colin manning) (04/23/91)

According to the v1.1 documentation for XmLabel, you can only have 
accelerators in an XmPushButton when it is part of a menu system.

I need to have buttons outside of a menu system that have this capability.
How can this be done?

Many thanks in advance.

-- 
- Colin Manning, cm%jet.uucp@ukc.ac.uk (world) OR cm@jet.uucp (UK only)
- Disclaimer: Please note that the above is a personal view and should not 
  be construed as an official comment from the JET project.

nazgul@alfalfa.com (Information Junkie) (04/24/91)

> According to the v1.1 documentation for XmLabel, you can only have 
> accelerators in an XmPushButton when it is part of a menu system.
> 
> I need to have buttons outside of a menu system that have this capability.
> How can this be done?

The short answer is that you can't.

The long answer?
First you need to patch the Motif Label code to let you display the
accelerator....  But if that doesn't matter then you still need (as far
as I can tell) to explicitly install the accelerator (using the appropriate
Xt call) on every single widget in the interface.  And after all that is
said and done I still couldn't get accelerators to work if the current 
focus is on a gadget.

The medium answer is that you complain to your Motif vendor that you need
the functionality and ask them to tell OSF :-).

Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.