Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 8
Modify the state of menu items
#include <Ap.h>
int ApModifyItemState( ApMenuLink_t *menu,
int state,
int item_no,
item_no, ..., NULL );
- 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.
Ap
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.
- 1
- Successful completion
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(),
ApModifyItemAccel(),
ApModifyItemText()
“Enabling,
disabling, or toggling menu items” in the Working with Code
chapter of the Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 159
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apmodifyitemstate.html on line 159