| Package | qnx.dialog |
| Class | public final class DialogButtonProperty |
| Inheritance | DialogButtonProperty Object |
DialogButtonProperty class contains dialog button properties.
The properties enable you to modify the appearance or behavior of a button.
See also
| Method | Defined By | ||
|---|---|---|---|
Creates a DialogButtonProperty instance. | DialogButtonProperty | ||
| Constant | Defined By | ||
|---|---|---|---|
| CONTEXT : String = context [static]
A constant representing the button "context" property. | DialogButtonProperty | ||
| ENABLED : String = enabled [static]
A constant representing the button "enabled" property. | DialogButtonProperty | ||
| LABEL : String = label [static]
A constant representing the button "label" property. | DialogButtonProperty | ||
| SKIN : String = skin [static]
A constant representing the button "skin" property. | DialogButtonProperty | ||
| VISIBLE : String = visible [static]
A constant representing the button "visible" property. | DialogButtonProperty | ||
| DialogButtonProperty | () | Constructor |
public function DialogButtonProperty()
Creates a DialogButtonProperty instance.
| CONTEXT | Constant |
public static const CONTEXT:String = contextA constant representing the button "context" property. The context value associates the button with the dialog instance.
| ENABLED | Constant |
public static const ENABLED:String = enabled
A constant representing the button "enabled" property. Pass this value into the setButtonPropertyAt()
method along with a Boolean to disable a button.
| LABEL | Constant |
public static const LABEL:String = label
A constant representing the button "label" property. Pass this value into the setButtonPropertyAt()
method along with a String to specify the label for a button.
| SKIN | Constant |
public static const SKIN:String = skin
A constant representing the button "skin" property. Pass this value into the setButtonPropertyAt()
method to set the skin of a button.
| VISIBLE | Constant |
public static const VISIBLE:String = visible
A constant representing the button "visible" property. Pass this value into the setButtonPropertyAt()
method to set the visibility of the button.
In the following
listing, a dialog button is disabled by passing the DialogButtonProperty.ENABLED
property value (and the value false) into the
setButtonPropertyAt method:
private function showAlertDialog():void
{
alert = new AlertDialog();
alert.title = "Meeting reminder";
alert.message = "The group benefits meeting in the Blue room is about to start.";
alert.addButton("Snooze");
alert.addButton("Cancel");
alert.addButton("Help");
alert.setButtonPropertyAt(DialogButtonProperty.ENABLED, false, 2);
alert.dialogSize= DialogSize.SIZE_SMALL;
alert.addEventListener(Event.SELECT, dButtonClicked);
alert.show(IowWindow.getAirWindow().group);
}
The code snippet above produces the following dialog: