[comp.windows.x.motif] Problem using XmScrolledWindow

bishop@pacpwr.uucp (02/14/91)

help request...

I have a main window widget with a drawing area widget defined as
the work area.   I set XmNscrollingPolicy = XmAUTOMATIC because I
want motif to take care of the scroll bars.  Note main window is
a sub-class of the ScrolledWindow widget.   For the drawing area
widget I have overridden the translation table and defined my own
action routines to be called for most of the function keys on the
LK201 keyboard.

The problem is that some of my action routine are not being called
when I press certain function keys.   The keys are the up, down, 
right, left arrow keys, the prev screen and next screen keys, the
tab key and the keypad enter key.   Other keys may not be working...

It appears that the main window has grabbed these keys to perform 
keyboard traversal and scroll bar positioning.   If I hold the shift
key (or any other modifier) and then press these keys then my
action routines ARE called.

What is the best way of getting these keys to call my action routines
that have been defined in the translation table of the drawing area
widget?   Note that I have tried to call XtOverrideTranslations for
both the main window widget and the drawing area widget with no
success.

It turns out that if the main window resource XmScrollingPolicy
to XmAPPLICATION_DEFINED then my action routines are called.   However,
if the resource is XmAUTOMATIC, then the application doesn't need to
worry about the scroll bar placement or the scroll bar callback routines.

Richard Bishop