Search
Picker.dropdownWidth Property
See Also
 






Gets or sets the width of the dropdown.

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

 Syntax

JavaScript  Copy Code

get dropdownWidth() {}

 Property Value

A Unit instance that specifies the width.

 Example

The following code creates an ImagePicker, which derives from Picker and handles its valueChanging event:

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 = imagePicker.clearButtonStyle = u.PickerButtonStyle.Inline;
imagePicker.dropdownOffset = new MindFusion.Drawing.Point(10, 10);
imagePicker.dropdownHeight = new ui.Unit(20, ui.UnitType.Pixel);
imagePicker.dropdownWidth = new ui.Unit(100, ui.UnitType.Pixel);
imagePicker.invalidString = "Please, provide a valid image URL";
imagePicker.itemSize = new ui.Unit(20, ui.UnitType.Percent);

imagePicker.valueChanging.addEventListener(handleValueChanging);

function handleValueChanging(sender, args)
{
     if( sender.imageIndex === 0)
      {
        //do something
      }
}

 See Also