Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/RearrangeDialog.1.py
Andrea Gavana aacea1b672 Phoenix:
- Add support for `RearrangeDialog` and its friends in the documentation builder;
- Add XXXBook images for the various platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-29 19:04:17 +00:00

20 lines
649 B
Python

items = ["meat", "fish", "fruits", "beer"]
order = [3, 0, 1, 2]
dlg = wx.RearrangeDialog(None,
"You can also uncheck the items you don't like "
"at all.",
"Sort the items in order of preference",
order, items)
if dlg.ShowModal() == wx.ID_OK:
order = dlg.GetOrder()
for n in order:
if n >= 0:
wx.LogMessage("Your most preferred item is \"%s\""%n)
break