Inheritance diagram for wx.SimpleHtmlListBox:
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 <html> or <body> tags.
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 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 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. |
Constructor, creating and showing the HTML list box.
Parameters:
Returns: