Modify the state of menu items
#include <Ap.h> int ApModifyItemState( ApMenuLink_t *menu, int state, int item_no, item_no, ..., NULL );
ApModifyItemState() modifies the state of menu items in a PhAB menu module. The arguments are:
You can call ApModifyItemState() at any time to set the menu item states and the effect will be seen when the menu is displayed. This lets you set menu item states as soon as conditions within your application change.
In this example, mymenu is a pointer to the address of the menu name, which is equivalent to the instance name for the menu module.
/* Dim the ABN_opt1, ABN_opt2, and ABN_opt3 menu items. */ ApModifyItemState( &mymenu, AB_ITEM_DIM, ABN_opt1, ABN_opt2, ABN_opt3, NULL );
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
ApGetItemText(), ApModifyItemText()
"Enabling, disabling, or toggling menu items" in the Working with Code chapter of the Photon Programmer's Guide