dialog_update_button()

Update a button with new values.

Synopsis:

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

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.

Library:

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

Description:

The dialog_update_button() function updates a button that has already been added to the dialog 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.