Tuesday, 15 January 2013

Multi-Selection List: multi selection list


Multi-Selection List: multi selection list

Syntax: multi selection list(choices[, style,
search field ])
Example code:
appuifw.multi_selection_list(choices, 'checkbox', 1)
The multi selection list() function shows a dialog that allows
the user to select multiple list items. The function returns a tuple of
indices of the chosen items, or an empty tuple if the user cancels the
selection.
In Example 7, the parameter choices is a list of Unicode strings and
style is an optional string with the default value "checkbox". This
dialog shows a check box to the left of each item in the list. You can
browse the list with the navigation keys on the mobile phone keyboard
and select items by pressing the Select key (see Figure 3.6).
The search field parameter is 0 (disabled) by default and it is
optional. Setting it to 1 shows a find pane that helps the user search for
items in long lists. If enabled, the find pane is always visible with the
list.


Example 7: Multi-selection list
import appuifw
colors = [u"red", u"green", u"blue", u"orange"]
selections = appuifw.multi_selection_list(colors,'checkbox',1)
print selections














No comments:

Post a Comment