Customizing your dialog box

Modifying dialog buttons

You can customize the appearance and behavior of buttons in a dialog box by invoking  Dialog.setButtonPropertyAt() and specifying the following parameters:

Parameter Value
Property name Provide one of the constants found in the  DialogButtonProperty class. (ENABLED, LABEL, VISIBLE)
Value Provide an object that is appropriate to the type of property you want to apply. For example, if you specify the  ENABLED property in the first parameter, you must pass a boolean value in this parameter. Similarly, if you specified LABEL in the first parameter, you must pass a String in this parameter.
Index Provide the index of the button to which you want to apply the property that you specified in the first parameter. Your first button begins at the index count of 0.