I would like to disable a numeric float type widget from the tab order in
certain circumstances. Setting Pt_GHOST to Pt_TRUE and Pt_EDITABLE and
Pt_NUMERIC_ENABLE_UPDOWN to Pt_FALSE greyed out the text entry portion of
the widget and rendered the spinners invisible. But for the final trick I’d
like the tab key to skip over the widget altogether. I’ve tried various
combinations of Pt_GETS_FOCUS and Pt_SELECTABLE without success.
Harry Qualls <hfq@tree-d.com> wrote:
I would like to disable a numeric float type widget from the tab order in
certain circumstances. Setting Pt_GHOST to Pt_TRUE and Pt_EDITABLE and
Pt_NUMERIC_ENABLE_UPDOWN to Pt_FALSE greyed out the text entry portion of
the widget and rendered the spinners invisible. But for the final trick I’d
like the tab key to skip over the widget altogether. I’ve tried various
combinations of Pt_GETS_FOCUS
The Pt_GETS_FOCUS bit of Pt_ARG_FLAGS is what you want. Can
you post a code snipped that shows what you tried?
A quick test app. with three PtButton buttons shows that this
works. I’m getting… interesting results with PtNumericFloat
widgets. I’ll tinker a bit further and let you know the results.
If worse comes to worse, and there is something wrong here, and
not just something related to this being a compound widget, then
what you could do as a workaround is to have a Pt_CB_GOT_FOCUS
callback for the widget, and use PtContainerGiveFocus() (or one
of the other focus functions) to programmatically shift focus to
another widget.
Norbert Black
QSSL Training Services
Here’s the code intending to disable the tab stop. There are three numeric
float widgets involved.
if ( !sScnrInfo[eRT].iActive ) { // Ghost the fields
PtSetArg( &arg[0], Pt_ARG_FLAGS, Pt_TRUE, Pt_GHOST );
PtSetArg( &arg[1], Pt_ARG_FLAGS, Pt_FALSE, Pt_GETS_FOCUS );
PtSetArg( &arg[2], Pt_ARG_NUMERIC_TEXT_FLAGS, Pt_FALSE, Pt_EDITABLE );
PtSetArg( &arg[3], Pt_ARG_NUMERIC_FLAGS, Pt_FALSE,
Pt_NUMERIC_ENABLE_UPDOWN );
PtSetResources( ABW_GeomAngleTR, 4, arg );
PtSetResources( ABW_GeomHOfsTR, 4, arg );
PtSetResources( ABW_GeomVOfsTR, 4, arg );
}
“Norbert Black” <nblack@qnx.com> wrote in message
news:9ck5ir$3nu$1@nntp.qnx.com…
Harry Qualls <> hfq@tree-d.com> > wrote:
I would like to disable a numeric float type widget from the tab order
in
certain circumstances. Setting Pt_GHOST to Pt_TRUE and Pt_EDITABLE and
Pt_NUMERIC_ENABLE_UPDOWN to Pt_FALSE greyed out the text entry portion
of
the widget and rendered the spinners invisible. But for the final trick
I’d
like the tab key to skip over the widget altogether. I’ve tried various
combinations of Pt_GETS_FOCUSThe Pt_GETS_FOCUS bit of Pt_ARG_FLAGS is what you want. Can
you post a code snipped that shows what you tried?A quick test app. with three PtButton buttons shows that this
works. I’m getting… interesting results with PtNumericFloat
widgets. I’ll tinker a bit further and let you know the results.If worse comes to worse, and there is something wrong here, and
not just something related to this being a compound widget, then
what you could do as a workaround is to have a Pt_CB_GOT_FOCUS
callback for the widget, and use PtContainerGiveFocus() (or one
of the other focus functions) to programmatically shift focus to
another widget.
Norbert Black
QSSL Training Services
Harry Qualls <hfq@tree-d.com> wrote:
Here’s the code intending to disable the tab stop. There are three numeric
float widgets involved.if ( !sScnrInfo[eRT].iActive ) { // Ghost the fields
PtSetArg( &arg[0], Pt_ARG_FLAGS, Pt_TRUE, Pt_GHOST );
PtSetArg( &arg[1], Pt_ARG_FLAGS, Pt_FALSE, Pt_GETS_FOCUS );
PtSetArg( &arg[2], Pt_ARG_NUMERIC_TEXT_FLAGS, Pt_FALSE, Pt_EDITABLE );
PtSetArg( &arg[3], Pt_ARG_NUMERIC_FLAGS, Pt_FALSE,
Pt_NUMERIC_ENABLE_UPDOWN );
PtSetResources( ABW_GeomAngleTR, 4, arg );
PtSetResources( ABW_GeomHOfsTR, 4, arg );
PtSetResources( ABW_GeomVOfsTR, 4, arg );
}
Looks good…
I worked on this a bit further, and it seems that (unlike
PtMultiText, for instance, which is also a compound widget), both
PtNumericFloat and PtNumericInteger are ignoring the
Pt_GETS_FOCUS bit in Pt_ARG_FLAGS.
I’ve kicked this up the chain, and we’ll see what happens. For
now, I think you’re going to need to do the trick with the
Pt_CB_GOT_FOCUS callback.
If I get a chance later on, I’ll try this with a Photon 2.0
sample and see if this was caught with the new version.
Norbert Black
QSSL Training Services
Hi Harry,
I checked with the developer and a PR was summitted on this issue.
Thanks
Brenda
Previously, Norbert Black wrote in qdn.public.qnx4.photon:
Harry Qualls <> hfq@tree-d.com> > wrote:
Here’s the code intending to disable the tab stop. There are three numeric
float widgets involved.if ( !sScnrInfo[eRT].iActive ) { // Ghost the fields
PtSetArg( &arg[0], Pt_ARG_FLAGS, Pt_TRUE, Pt_GHOST );
PtSetArg( &arg[1], Pt_ARG_FLAGS, Pt_FALSE, Pt_GETS_FOCUS );
PtSetArg( &arg[2], Pt_ARG_NUMERIC_TEXT_FLAGS, Pt_FALSE, Pt_EDITABLE );
PtSetArg( &arg[3], Pt_ARG_NUMERIC_FLAGS, Pt_FALSE,
Pt_NUMERIC_ENABLE_UPDOWN );
PtSetResources( ABW_GeomAngleTR, 4, arg );
PtSetResources( ABW_GeomHOfsTR, 4, arg );
PtSetResources( ABW_GeomVOfsTR, 4, arg );
}Looks good…
I worked on this a bit further, and it seems that (unlike
PtMultiText, for instance, which is also a compound widget), both
PtNumericFloat and PtNumericInteger are ignoring the
Pt_GETS_FOCUS bit in Pt_ARG_FLAGS.I’ve kicked this up the chain, and we’ll see what happens. For
now, I think you’re going to need to do the trick with the
Pt_CB_GOT_FOCUS callback.If I get a chance later on, I’ll try this with a Photon 2.0
sample and see if this was caught with the new version.
Norbert Black
QSSL Training Services