qnx.dialog.DialogButtonProperty

DialogButtonProperty

Methods | Constants | Examples


Packageqnx.dialog
Classpublic final class DialogButtonProperty
InheritanceDialogButtonProperty Inheritance Object

The DialogButtonProperty class contains dialog button properties.

The properties enable you to modify the appearance or behavior of a button.



Class information:
PlayBook Tablet OS Version:   1.0.6

View the examples

See also

BaseDialog
BaseDialog.setButtonPropertyAt()



Public Methods

 MethodDefined By
  
Creates a DialogButtonProperty instance.
DialogButtonProperty

Public Constants

 ConstantDefined 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

Constructor Detail

DialogButtonProperty()


public function DialogButtonProperty()

Creates a DialogButtonProperty instance.

Constant Detail

CONTEXT


public static const CONTEXT:String = context

A constant representing the button "context" property. The context value associates the button with the dialog instance.

ENABLED


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


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


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


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.

Examples

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: