ApModifyItemState
![]() |
![]() |
![]() |
![]() |
ApModifyItemState()
Modify the state of menu items
Synopsis:
#include <Ap.h>
int ApModifyItemState( ApMenuLink_t *menu,
int state,
int item_no,
item_no, ..., NULL );
Arguments:
- menu
- A pointer to a PhAB menu link structure.
- state
- The state you want to set for the menu items:
- AB_ITEM_DIM — disabled.
- AB_ITEM_NORMAL — enabled and not set.
- AB_ITEM_SET — set on (toggle item).
- item_no, item_no, ..., NULL
- A list of menu items, followed by NULL to terminate the list. The menu items are values that are generated by PhAB for each menu item in a menu module.
Library:
Ap
Description:
ApModifyItemState() modifies the state of menu items in a PhAB menu module.
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.
Returns:
- 1
- Successful completion
Examples:
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 );
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
ApGetItemText(), ApModifyItemAccel(), ApModifyItemText()
“Enabling, disabling, or toggling menu items” in the Working with Code chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
