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/apmodifyitemtext.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/apmodifyitemtext.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/apmodifyitemtext.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/apmodifyitemtext.html on line 8

ApModifyItemText()

Modify the text for a menu item

Synopsis:

#include <Ap.h>
int ApModifyItemText( ApMenuLink_t *menu,
                      int item_num, 
                      char const *new_text );

Arguments:

menu
A pointer to a PhAB menu link structure.
item_num
The number of the menu item, as generated by PhAB.
new_text
A pointer to the replacement menu item text.

Library:

Ap

Description:

ApModifyItemText() modifies the text for a menu item in a PhAB menu module.


Note: ApModifyItemText() stores the address given by new_text; it doesn't make a copy of the string pointed to by new_text. Don't modify the string after calling this function.

You can call ApModifyItemText() at any time to set the menu item text, and the effect will be seen when the menu is displayed. This allows to you set menu item text as soon as conditions within your application change.

Returns:

0
The item number isn't valid.
1
Success.

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.

/* Change ABN_opt1 to say "New Option 1 Text" */
ApModifyItemText( &mymenu, ABN_opt1, "New Option 1 Text" );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApGetItemText(), ApModifyItemAccel(), ApModifyItemState()

Changing menu-item text 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/apmodifyitemtext.html on line 153

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/apmodifyitemtext.html on line 153