dialog_context_menu_update_button()

Update a context menu button with new values.

Synopsis:

#include <bps/dialog.h>
 
BPS_API int dialog_context_menu_update_button(dialog_instance_t dialog,
                                              int index,
                                              const char *label,
                                              bool enabled,
                                              const char *button_context,
                                              bool visible,
                                              dialog_context_menu_icon_t icon)

Since:

BlackBerry 10.0.0

Arguments:

dialog

The dialog that has the button to update.

index

The index of the button to update.

label

The button label. Pass NULL to retain the existing value, if previously set.

enabled

If true, the button is enabled when the dialog is displayed; if false, the button is disabled when the dialog is displayed.

button_context

The button context. Pass NULL to retain the existing value, if previously set.

visible

If true, the button is visible when the dialog is displayed; if false, the button is not visible when the dialog is displayed.

icon

The icon to display. Pass KEEP_ICON to retain the existing icon, if previously set.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The dialog_context_menu_update_button() function updates the specified context menu button that has already been added with new values. If the dialog is currently displayed when the request to update the button is made, the update is not reflected until dialog_update() is called.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus