dialog_set_default_button_index()

Set the default button index for a dialog.

Synopsis:

#include <bps/dialog.h>
 
BPS_API int dialog_set_default_button_index(dialog_instance_t dialog,
                                            int default_button_index)

Since:

BlackBerry 10.0.0

Arguments:

dialog

The dialog to update.

default_button_index

The default button index to set. Buttons are indexed in the order that they are added with dialog_add_button(), starting at 0.

Library:

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

Description:

The dialog_set_default_button_index() function sets the index of the button that is actioned when the Enter key is pressed while the dialog is displayed. This action is equivalent to the user pressing the button at the given index.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.