question with menu

Qnx Rtp v6.1

hi,
i create menu and one item (with shorcut Ctrl + H)
when i select item with mouse
i received events
but
when i press from keyboard the
shortcut “Crtl + H” of item,i have no events !

what’s missing ?
thanks,

//creation of item menu with shortcut

PtArg_t arg[2];

PtWidget_t *item_menu,*menu; //menu pointeur of menu

PtSetArg(&arg[0],Pt_ARG_TEXT_STRING,“Item”,0);

item_menu = PtCreateWidget(PtMenuButton,menu,1,arg);

PtSetResource(item_menu,Pt_ARG_ACCEL_TEXT,“H”,0);

PtSetResource(item_menu,Pt_ARG_MODIFIER_KEYS,Pk_KM_Ctrl,Pk_KM_Ctrl);

Hello,

You have to set a hotkey callback on the base window after you have
added the hotkey label for the menu.

Regards,
Dave B.



rgb wrote:

Qnx Rtp v6.1

hi,
i create menu and one item (with shorcut Ctrl + H)
when i select item with mouse
i received events
but
when i press from keyboard the
shortcut “Crtl + H” of item,i have no events !

what’s missing ?
thanks,

//creation of item menu with shortcut

PtArg_t arg[2];

PtWidget_t *item_menu,*menu; //menu pointeur of menu

PtSetArg(&arg[0],Pt_ARG_TEXT_STRING,“Item”,0);

item_menu = PtCreateWidget(PtMenuButton,menu,1,arg);

PtSetResource(item_menu,Pt_ARG_ACCEL_TEXT,“H”,0);

PtSetResource(item_menu,Pt_ARG_MODIFIER_KEYS,Pk_KM_Ctrl,Pk_KM_Ctrl);