T.R | Title | User | Personal Name | Date | Lines |
---|
1210.1 | | LEOVAX::TREGGIARI | | Tue Aug 01 1989 13:38 | 28 |
| I suspect the problem is a little different than you think it is. That is,
that the problem has nothing to do with "clicking", but instead where
you place the mouse cursor.
The reason is not obvious and has to do with the way that the server delivers
keyboard events. The window that the server places in the keyboard event
is the window with input focus (in your case the Main Window...) EXCEPT
when the mouse cursor is within a child of the focus window, AND that child
has requested keyboard input. The way that the Intrinsics dispatch events
is to find the widget associated with the window in the event structure,
and "give" the event to that widget.
In your case, the Dialog Box children of the Main Window widget DO ask
for keyboard events (for default button processing). So, when the mouse
cursor is within one of the Dialog Boxes, the keyboard event will be
delivered to the Dialog Box, not the Main Window.
There are two ways to get this to work the way you want:
1. Play with the Dialog Boxes translations (if you don't need default
button or TAB processing) so that the Dialog Boxes don't ask for
keyboard events (you probably don't want to try to do this...)
2. Install all the accelerators on the Dialog Boxes AS WELL AS the
Main Window widget.
Leo
|
1210.2 | Thanx for the insight ! | ODIUM::ULLETT | Life moves pretty fast ... | Thu Aug 03 1989 06:51 | 6 |
|
Okay guess the easiest for now is to continue Installing on the dialog_boxes ...
Thanks!
|
1210.3 | More about keyboard accelerators | RANCHO::KIMBALL | You're soaking in it... | Tue Aug 15 1989 18:14 | 19 |
| What a timely subject! This brings up two more questions which I was
just about to experiment with:
1. What other widgets besides the MainWindow and DialogBox actually
accept focus?
2. In general, is it necessary to install accelerators on any and all
widgets in your application which may have focus at some point?
3. Specifically, if you have text input fields inside a dialog box
and still want accelerators to work with your menus, should you:
A. Install accelerators on the dialog box?
B. Install accelerators on the stext widgets?
C. Install accelerators on the main window?
D. Some of the above
E. All of the above
F. etc. :-)
|
1210.4 | | LEOVAX::TREGGIARI | | Sun Aug 20 1989 21:27 | 28 |
|
> 1. What other widgets besides the MainWindow and DialogBox actually
> accept focus?
Text widget (of course...), and composite widgets which contain a text
widget (e.g. Command Window widget). Also note that a MainWindow widget or
Dialog Box widget won't take focus if one of its descendants is
a text widget. They will give it to the text widget.
> 2. In general, is it necessary to install accelerators on any and all
> widgets in your application which may have focus at some point?
Unfortunately, yes.
> 3. Specifically, if you have text input fields inside a dialog box
> and still want accelerators to work with your menus, should you:
> A. Install accelerators on the dialog box?
> B. Install accelerators on the stext widgets?
> C. Install accelerators on the main window?
> D. Some of the above
> E. All of the above
> F. etc. :-)
It should only be necessary on the text widgets in this case.
Leo
|
1210.5 | | GOSOX::RYAN | DECwindows Mail | Mon Aug 21 1989 09:06 | 18 |
| >> 3. Specifically, if you have text input fields inside a dialog box
>> and still want accelerators to work with your menus, should you:
>> A. Install accelerators on the dialog box?
>> B. Install accelerators on the stext widgets?
>> C. Install accelerators on the main window?
>> D. Some of the above
>> E. All of the above
>> F. etc. :-)
> It should only be necessary on the text widgets in this case.
Unfortunately, you must also install the accelerators on the dialog
box. It doesn't actually take focus, but because of the grab it
places on the TAB key, if you don't accelerators will not work if
the pointer is in the dialog box.
Mike
|
1210.6 | UIL? | HPSRAD::KOMAR | the (w)hole story | Fri Apr 20 1990 15:02 | 6 |
|
Could anyone provide a uil example of this stuff?
Thanks
-pk.
|