wxsimplehtmllistboxwxsimplehtmllistbox is an implementation of wxhtmllistbox which shows html content in the listbox rows. unlike wxhtmllistbox, 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 wxsimplehtmllistbox fully implements the wxcontrolwithitems interface, thus you should refer to wxcontrolwithitems's documentation for the api reference for adding/removing/retrieving items in the listbox. also note that the wxvlistbox::setitemcount function is protected in wxsimplehtmllistbox's context so that you cannot call it directly, wxsimplehtmllistbox 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(const wxarraystring &) function. thus the only difference between a wxlistbox and a wxsimplehtmllistbox is that the latter stores strings which can contain html fragments (see the list of tags supported by wxhtml). note that the html strings you fetch to wxsimplehtmllistbox should not contain the <html> or <body> tags. derived from
wxhtmllistbox, wxcontrolwithitems include files <wx/htmllbox.h> window styles
see also window styles overview. event handling a wxsimplehtmllistbox emits the same events used by wxlistbox and by wxhtmllistbox. the event handlers for the following events take a wxcommandevent:
the event handlers for the following events take a wxhtmlcellevent or a wxhtmllinkevent:
members
wxsimplehtmllistbox::wxsimplehtmllistbox
wxsimplehtmllistbox::wxsimplehtmllistboxwxhtmllistbox(wxwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, int n = 0, const wxstring choices[] = null, long style = wxhlb_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "simplehtmllistbox") wxhtmllistbox(wxwindow* parent, wxwindowid id, const wxpoint& pos, const wxsize& size, const wxarraystring& choices, long style = wxhlb_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "simplehtmllistbox") constructor, creating and showing the html list box. parameters parent
id
pos
size
n
choices
style
validator
name
see also
wxsimplehtmllistbox() default constructor, you must call create() later.
wxsimplehtmllistbox::~wxsimplehtmllistbox~wxsimplehtmllistbox() frees the array of stored items and relative client data.
wxsimplehtmllistbox::createbool create(wxwindow* parent, wxwindowid id, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, int n, const wxstring choices[] = null, long style = wxhlb_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "simplehtmllistbox") bool create(wxwindow* parent, wxwindowid id, const wxpoint& pos, const wxsize& size, const wxarraystring& choices, long style = wxhlb_default_style, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "simplehtmllistbox") creates the html listbox for two-step construction. see wxsimplehtmllistbox::wxsimplehtmllistbox for further details.
|