List Widget

Hello,
The PtList widget takes certain actions for the PgUp,PgDown,Home,End etc.
keys. Is there a way to disable these actions?

Thank you,
Shashank

yes, few.

The nicest and directest one I know:

  • use a Pt_CB_LIST_INPUT callback and code the following:

if ( cbinfo->reason == Pt_CB_LIST_INPUT && cbinfo->reason_subtype ==
Ph_EV_KEY ) {
PhKeyEvent_t *pkev;
pkev = (PhKeyEvent_t *) PhGetData (cbinfo->event);
if ( PkIsKeyDown (pkev->key_flags) switch (pkev->key_cap) {
case Pk_KEY_U_LIKE_TO_CATCH:
// do what you like to do
cbinfo->cbdata->consumed = Pt_END; // finishes this
special key event
break;
}
}
return (Pt_CONTINUE);

This cincludes all other keys not catched (e.g. cursor Up/Dn) still working
properly for the list.
In addition I use similar lines to wrap in a list if “cursor dn” is hit on
the last item or “cursor up” on the first item.

/martin




“Shashank” <sbalijepalli@precitech.com> schrieb im Newsbeitrag
news:atkn25$bvo$1@inn.qnx.com

Hello,
The PtList widget takes certain actions for the PgUp,PgDown,Home,End etc.
keys. Is there a way to disable these actions?

Thank you,
Shashank