.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.adv.EditableListBox:
==========================================================================================================================================
|phoenix_title| **wx.adv.EditableListBox**
==========================================================================================================================================
An editable listbox is composite control that lets the user easily enter, delete and reorder a list of strings.
^^
.. _EditableListBox-styles:
|styles| Window Styles
================================
This class supports the following styles:
- ``wx.adv.EL_ALLOW_NEW``: Allows the user to enter new strings.
- ``wx.adv.EL_ALLOW_EDIT``: Allows the user to edit existing strings.
- ``wx.adv.EL_ALLOW_DELETE``: Allows the user to delete existing strings.
- ``wx.adv.EL_NO_REORDER``: Does not allow the user to reorder the strings.
- ``wx.adv.EL_DEFAULT_STYLE``: Default style: EL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE. ^^
The control uses a
:ref:`wx.ListCtrl` internally and emit its events.
.. seealso:: :ref:`wx.ListBox`, :ref:`wx.ListCtrl`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
Inheritance diagram for class
EditableListBox:
|
|appearance| Control Appearance
===============================
|
.. figure:: _static/images/widgets/fullsize/wxmsw/wx.adv.editablelistbox.png
:alt: wxMSW
:figclass: floatleft
**wxMSW**
.. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png
:alt: wxMAC
:figclass: floatright
**wxMAC**
.. figure:: _static/images/widgets/fullsize/wxgtk/wx.adv.editablelistbox.png
:alt: wxGTK
:figclass: floatcenter
**wxGTK**
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.adv.EditableListBox.__init__` Default constructor.
:meth:`~wx.adv.EditableListBox.Create` Creates the editable listbox for two-step construction.
:meth:`~wx.adv.EditableListBox.GetClassDefaultAttributes`
:meth:`~wx.adv.EditableListBox.GetDelButton` Returns a reference to the delete button used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.GetDownButton` Returns a reference to the down button used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.GetEditButton` Returns a reference to the edit button used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.GetListCtrl` Returns a reference to the listctrl used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.GetNewButton` Returns a reference to the new button used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.GetStrings` Returns a list of the current contents of the control.
:meth:`~wx.adv.EditableListBox.GetUpButton` Returns a reference to the up button used in the EditableListBox.
:meth:`~wx.adv.EditableListBox.SetStrings` Replaces current contents with given strings.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.adv.EditableListBox.DelButton` See :meth:`~wx.adv.EditableListBox.GetDelButton`
:attr:`~wx.adv.EditableListBox.DownButton` See :meth:`~wx.adv.EditableListBox.GetDownButton`
:attr:`~wx.adv.EditableListBox.EditButton` See :meth:`~wx.adv.EditableListBox.GetEditButton`
:attr:`~wx.adv.EditableListBox.ListCtrl` See :meth:`~wx.adv.EditableListBox.GetListCtrl`
:attr:`~wx.adv.EditableListBox.NewButton` See :meth:`~wx.adv.EditableListBox.GetNewButton`
:attr:`~wx.adv.EditableListBox.Strings` See :meth:`~wx.adv.EditableListBox.GetStrings` and :meth:`~wx.adv.EditableListBox.SetStrings`
:attr:`~wx.adv.EditableListBox.UpButton` See :meth:`~wx.adv.EditableListBox.GetUpButton`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.adv.EditableListBox(Panel)
**Possible constructors**::
EditableListBox()
EditableListBox(parent, id=ID_ANY, label="", pos=DefaultPosition,
size=DefaultSize, style=EL_DEFAULT_STYLE, name=EditableListBoxNameStr)
An editable listbox is composite control that lets the user easily
enter, delete and reorder a list of strings.
.. method:: __init__(self, *args, **kw)
|overload| Overloaded Implementations:
:html:`
`
**__init__** `(self)`
Default constructor.
:html:`
`
**__init__** `(self, parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=EL_DEFAULT_STYLE, name=EditableListBoxNameStr)`
Constructor, creating and showing a list box.
:param `parent`: Parent window. Must not be ``None``.
:type `parent`: wx.Window
:param `id`: Window identifier. The value ``wx.ID_ANY`` indicates a default value.
:type `id`: wx.WindowID
:param `label`: The text shown just before the list control.
:type `label`: string
:param `pos`: Window position. If `wx.DefaultPosition` is specified then a default position is chosen.
:type `pos`: wx.Point
:param `size`: Window size. If `wx.DefaultSize` is specified then the window is sized appropriately.
:type `size`: wx.Size
:param `style`: Window style. See :ref:`wx.adv.EditableListBox`.
:type `style`: long
:param `name`: Window name.
:type `name`: string
.. seealso:: :meth:`Create`
:html:`
`
.. method:: Create(self, parent, id=ID_ANY, label="", pos=DefaultPosition, size=DefaultSize, style=EL_DEFAULT_STYLE, name=EditableListBoxNameStr)
Creates the editable listbox for two-step construction.
See :ref:`wx.adv.EditableListBox` for further details.
:param `parent`:
:type `parent`: wx.Window
:param `id`:
:type `id`: wx.WindowID
:param `label`:
:type `label`: string
:param `pos`:
:type `pos`: wx.Point
:param `size`:
:type `size`: wx.Size
:param `style`:
:type `style`: long
:param `name`:
:type `name`: string
:rtype: `bool`
.. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)
:param `variant`:
:type `variant`: wx.WindowVariant
:rtype: `VisualAttributes`
.. method:: GetDelButton(self)
Returns a reference to the delete button used in the EditableListBox.
:rtype: `BitmapButton`
.. method:: GetDownButton(self)
Returns a reference to the down button used in the EditableListBox.
:rtype: `BitmapButton`
.. method:: GetEditButton(self)
Returns a reference to the edit button used in the EditableListBox.
:rtype: `BitmapButton`
.. method:: GetListCtrl(self)
Returns a reference to the listctrl used in the EditableListBox.
:rtype: `ListCtrl`
.. method:: GetNewButton(self)
Returns a reference to the new button used in the EditableListBox.
:rtype: `BitmapButton`
.. method:: GetStrings(self)
Returns a list of the current contents of the control.
:rtype: `list of strings`
.. method:: GetUpButton(self)
Returns a reference to the up button used in the EditableListBox.
:rtype: `BitmapButton`
.. method:: SetStrings(self, strings)
Replaces current contents with given strings.
:param `strings`:
:type `strings`: list of strings
.. attribute:: DelButton
See :meth:`~wx.adv.EditableListBox.GetDelButton`
.. attribute:: DownButton
See :meth:`~wx.adv.EditableListBox.GetDownButton`
.. attribute:: EditButton
See :meth:`~wx.adv.EditableListBox.GetEditButton`
.. attribute:: ListCtrl
See :meth:`~wx.adv.EditableListBox.GetListCtrl`
.. attribute:: NewButton
See :meth:`~wx.adv.EditableListBox.GetNewButton`
.. attribute:: Strings
See :meth:`~wx.adv.EditableListBox.GetStrings` and :meth:`~wx.adv.EditableListBox.SetStrings`
.. attribute:: UpButton
See :meth:`~wx.adv.EditableListBox.GetUpButton`