Search
PickerButtonStyle Enumeration
See Also
 






Specifies the display mode of the button in a Picker control.

Namespace: MindFusion.Common.UI
File: DropDown.js

 Syntax

JavaScript  Copy Code

// enum
PickerButtonStyle = {}

 Members

  Member name Value Description

Block

1

Indicates that the button will be displayed to the right of the input element.

Inline

2

Indicates that the button will be displayed inside the input element.

None

0

Indicates that the button wil not be displayed.

 Example

The following code creates an ImagePicker with an initial list of 3 images and handles its valueChanging event. The image picker does not allow empty values and its buttons are rendered inside the input element:

JavaScript  Copy Code

var u = MindFusion.Common.UI;

var imagePicker = u.ImagePicker(document.getElementById("image_picker"));
imagePicker.imageList = ["my-folder/myImage.png", "my-folder1/myImage1.png", "my-folder2/myImage2.png"];
impagePicker.allowEmptyInput = false;
imagePicker.buttonStyle = u.PickerButtonStyle.Inline;

imagePicker.valueChanging.addEventListener(handleValueChanging);

function handleValueChanging(sender, args)
{
    //check the replaced image
    if(args.oldValue.url != "my-folder/myImage.png")
    {
       args.cancel = true;
    }
}

 See Also