******************** wx.SimpleHtmlListBox ******************** Inheritance diagram for `wx.SimpleHtmlListBox`: | .. inheritance-diagram:: wx.SimpleHtmlListBox | Description =========== `wx.SimpleHtmlListBox` is an implementation of `wx.HtmlListBox `_ which shows HTML content in the listbox rows. Unlike `wx.HtmlListBox `_, this is not an abstract class and thus it has the advantage that you can use it without deriving your own class from it. However, it also has the disadvantage that this is not a virtual control and thus it's not well-suited for those cases where you need to show a huge number of items: every time you add/insert a string, it will be stored internally and thus will take memory. The interface exposed by `wx.SimpleHtmlListBox` fully implements the `wx.ControlWithItems `_ interface, thus you should refer to `wx.ControlWithItems `_'s documentation for the API reference for adding/removing/retrieving items in the listbox. Also note that the `wx.VListBox.SetItemCount `_ function is **protected** in `wx.SimpleHtmlListBox` 's context so that you cannot call it directly, `wx.SimpleHtmlListBox` will do it for you. .. note:: In case you need to append a lot of items to the control at once, make sure to use the `Append `_ function. Thus the only difference between a `wx.ListBox `_ and a `wx.SimpleHtmlListBox` is that the latter stores strings which can contain HTML fragments. .. note:: Note that the HTML strings you fetch to `wx.SimpleHtmlListBox` should not contain the ```` or ```` tags. Derived From ^^^^^^^^^^^^^ * `wx.HtmlListBox `_ * `wx.ControlWithItems `_ * `wx.VListBox `_ * `wx.VScrolledWindow `_ * `wx.Panel `_ * `wx.Window `_ * `wx.EvtHandler `_ * `wx.Object `_ Window Styles ^^^^^^^^^^^^^ ================================================== ================================================== Window Style Description ================================================== ================================================== ``wx.HLB_DEFAULT_STYLE`` The default style: ``wx.SUNKEN_BORDER`` ``wx.HLB_MULTIPLE`` Multiple-selection list: the user can toggle multiple items on and off. ================================================== ================================================== Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_LISTBOX(id, func) Process a ``wx.wxEVT_COMMAND_LISTBOX_SELECTED`` event, when an item on the list is selected. wx.EVT_LISTBOX_DCLICK(id, func) Process a ``wx.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED`` event, when the listbox is double-clicked. wx.html.EVT_HTML_CELL_CLICKED(id, func) A `wx.html.HtmlCell <../html/wx.html.HtmlCell.html>`_ was clicked. wx.html.EVT_HTML_CELL_HOVER(id, func) The mouse passed over a `wx.html.HtmlCell`. wx.html.EVT_HTML_LINK_CLICKED(id, func) A `wx.html.HtmlCell` which contains an hyperlink was clicked. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, choices=[], style=wx.HLB_DEFAULT_STYLE, validator=wx.DefaultValidator, name=wx.SimpleHtmlListBoxNameStr) Constructor, creating and showing the HTML list box. **Parameters:** * `parent` (`wx.Window `_) * `id` (int) * `pos` (`wx.Point `_) * `size` (`wx.Size `_) * `choices` (list of strings) * `style` (long) * `validator` (`wx.Validator `_) * `name` (string) | **Returns:** `wx.SimpleHtmlListBox `_