Ubuntu.Components.ListItems ValueSelector

List item displaying single selected value when not expanded, where expanding it opens a listing of all the possible values for selection.

Import Statement: import Ubuntu.Components.ListItems 1.3
Inherits: Empty
  • Obsolete members

Properties

Detailed Description

****DEPRECATED! PLEASE USE ITEM SELECTOR OR FOR THE UBUNTU SHAPE VERSION THE OPTION SELECTOR.****

Examples:

import Ubuntu.Components.ListItems 1.3 as ListItem
Column {
    width: 250
    ListItem.ValueSelector {
        text: "Standard"
        values: ["Value 1", "Value 2", "Value 3", "Value 4"]
    }
    ListItem.ValueSelector {
        text: "Disabled"
        values: ["Value 1", "Value 2", "Value 3", "Value 4"]
        enabled: false
    }
    ListItem.ValueSelector {
        text: "Expanded"
        values: ["Value 1", "Value 2", "Value 3", "Value 4"]
        expanded: true
    }
    ListItem.ValueSelector {
        text: "Icon"
        iconName: "compose"
        values: ["Value 1", "Value 2", "Value 3", "Value 4"]
        selectedIndex: 2
    }
}

Property Documentation

expanded : bool

Specifies whether the selector is ‘open’ or ‘closed’.

fallbackIconName : string

The icon shown in the list item if iconName failed to load (optional).

If both fallbackIconSource and fallbackIconName are defined, fallbackIconName will be ignored.

Note: The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:

  • Ubuntu Touch: /usr/share/icons/suru
  • Ubuntu Desktop: /usr/share/icons/ubuntu-mono-dark

These 2 separate icon themes will be merged soon.

fallbackIconSource : url

The location of the icon to show in the list item if iconSource failed to load (optional).

iconFrame : bool

Show or hide the frame around the icon

selectedIndex : int

The index of the currently selected element from the values array.

values : variant

The list of values that will be shown under the label text