Package Gnumed :: Package wxpython :: Module gmListWidgets |
[frames] | no frames]

# Module gmListWidgets

source code

    GNUmed list controls and widgets.

    TODO:

            From: Rob McMullen <rob.mcmullen@gmail.com>
            To: wxPython-users@lists.wxwidgets.org
            Subject: Re: [wxPython-users] ANN: ColumnSizer mixin for ListCtrl

            Thanks for all the suggestions, on and off line.  There's an update
            with a new name (ColumnAutoSizeMixin) and better sizing algorithm at:

            http://trac.flipturn.org/browser/trunk/peppy/lib/column_autosize.py

            sorting: http://code.activestate.com/recipes/426407/

Author: Karsten Hilbert <Karsten.Hilbert@gmx.net>

License: GPL v2 or later

Classes
| cGenericListSelectorDlg A dialog holding a list and a few buttons to act on the items.
| cGenericListManagerPnl A panel holding a generic multi-column list and action buttions.
| cItemPickerDlg
| cReportListCtrl

Functions
get_choices_from_list(parent=None, msg=None, caption=None, columns=None, choices=None, data=None, selections=None, edit_callback=None, new_callback=None, delete_callback=None, refresh_callback=None, single_selection=False, can_return_empty=False, ignore_OK_button=False, left_extra_button=None, middle_extra_button=None, right_extra_button=None, list_tooltip_callback=None) Let user select item(s) from a list. | source code

Variables
| __package__ = ``'``Gnumed.wxpython``'``

Imports: sys, types, logging, thread, time, regex, wx, listmixins, wxgGenericListSelectorDlg, wxgGenericListManagerPnl, wxgItemPickerDlg

Function Details

### get_choices_from_list(parent=None, msg=None, caption=None, columns=None, choices=None, data=None, selections=None, edit_callback=None, new_callback=None, delete_callback=None, refresh_callback=None, single_selection=False, can_return_empty=False, ignore_OK_button=False, left_extra_button=None, middle_extra_button=None, right_extra_button=None, list_tooltip_callback=None) | source code
    Let user select item(s) from a list.

    - new_callback: ()
    - edit_callback: (item data)
    - delete_callback: (item data)
    - refresh_callback: (listctrl)
    - list_tooltip_callback: (item data)

    - left/middle/right_extra_button: (label, tooltip, <callback> [, wants_list_ctrl])
            wants_list_ctrl is optional
            <callback> is called with item_data (or listctrl) as the only argument

    returns:
            on [CANCEL]: None
            on [OK]:
                    if any items selected:
                            if single_selection:
                                    the data of the selected item
                            else:
                                    list of data of selected items
                    else:
                            if can_return_empty is True AND [OK] button was pressed:
                                    empty list
                            else:
                                    None