No Enter on PtText

I have a dialog window with many PtText fields. For the most part the
operator will be entering numbers into these fields. (Occasionally they
will enter non-numeric data which is why they are text boxes.)

Since there is no key near the numeric keypad I want to use the
key as a tab key and put the user into the next field. I have
added the hot key callback to the window for the key, but it is
not being called. I assume that the key is being trapped by the
PtText widget. Can I disable this?

P.S. The PtText widget have NO callbacks registered to them. There is a
Process button on the dialog that reads all of the text boxes and processes
them accordingly.

If you set the “Pt_HOTKEYS_FIRST” Container flag on the base window your
hotkey callback (on the base window) should get invoked. Without this flag
set the widget with current focus (textbox) will get a chance to handle the
key event before the base windows. Since the PtText is all about handling
key events, it does and the event is never gets down to the base window.


Regards,

Joe

Bill Caroselli <qtps@earthlink.net> wrote in message
news:cj1tbe$se3$1@inn.qnx.com

I have a dialog window with many PtText fields. For the most part the
operator will be entering numbers into these fields. (Occasionally they
will enter non-numeric data which is why they are text boxes.)

Since there is no key near the numeric keypad I want to use the
Enter> key as a tab key and put the user into the next field. I have
added the hot key callback to the window for the key, but it is
not being called. I assume that the key is being trapped by the
PtText widget. Can I disable this?

P.S. The PtText widget have NO callbacks registered to them. There is a
Process button on the dialog that reads all of the text boxes and
processes
them accordingly.

You can use Pt_CB_ACTIVATE on your PtText widgets. Please take a look at the
PtText doc ‘Activate Callback’ section. It handles Enter key.
-Misha.

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:cj1tbe$se3$1@inn.qnx.com

I have a dialog window with many PtText fields. For the most part the
operator will be entering numbers into these fields. (Occasionally they
will enter non-numeric data which is why they are text boxes.)

Since there is no key near the numeric keypad I want to use the
Enter> key as a tab key and put the user into the next field. I have
added the hot key callback to the window for the key, but it is
not being called. I assume that the key is being trapped by the
PtText widget. Can I disable this?

P.S. The PtText widget have NO callbacks registered to them. There is a
Process button on the dialog that reads all of the text boxes and
processes
them accordingly.

Joe Mammone <hw@qnx.com> wrote:
JM > If you set the “Pt_HOTKEYS_FIRST” Container flag on the base window your
JM > hotkey callback (on the base window) should get invoked. Without this flag
JM > set the widget with current focus (textbox) will get a chance to handle the
JM > key event before the base windows. Since the PtText is all about handling
JM > key events, it does and the event is never gets down to the base window.


JM > Regards,
JM > Joe

Thanks. This worked great.

Bill Caroselli <qtps@earthlink.net> wrote:
BC > Joe Mammone <hw@qnx.com> wrote:
BC > JM > If you set the “Pt_HOTKEYS_FIRST” Container flag on the base window your
BC > JM > hotkey callback (on the base window) should get invoked. Without this flag
BC > JM > set the widget with current focus (textbox) will get a chance to handle the
BC > JM > key event before the base windows. Since the PtText is all about handling
BC > JM > key events, it does and the event is never gets down to the base window.


BC > JM > Regards,
BC > JM > Joe

BC > Thanks. This worked great.

One more related question.

I have a PtScrollContainer that contains 22 PtGroups. The groups all
contain 10 PtText widgets.

The PtScrollContainer has the Pt_SCROLLCONT_TRACK_FOCUS flag set but it
does not appear to work. I assume that it’s because the widget that has
focus is not a child of the PtScrollContainer widget but a grandchild
instead.

Is there a flag that I can set that WILL work as exepcted?