Version: 2.9.4
Public Member Functions
wxSimpleHtmlListBox Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/htmllbox.h>

Inheritance diagram for wxSimpleHtmlListBox:

Detailed Description

wxSimpleHtmlListBox 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.

Styles

This class supports the following styles:

A wxSimpleHtmlListBox emits the same events used by wxListBox and by wxHtmlListBox.

Events emitted by this class

Event macros for events emitted by this class:

Library:  wxHTML
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
参照:
wxSimpleHtmlListBox::Create

Public Member Functions

 wxSimpleHtmlListBox (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=wxSimpleHtmlListBoxNameStr)
 Constructor, creating and showing the HTML list box.
 wxSimpleHtmlListBox (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=wxSimpleHtmlListBoxNameStr)
 Constructor, creating and showing the HTML list box.
 wxSimpleHtmlListBox ()
 Default constructor, you must call Create() later.
virtual ~wxSimpleHtmlListBox ()
 Frees the array of stored items and relative client data.
bool Create (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=wxSimpleHtmlListBoxNameStr)
 Creates the HTML listbox for two-step construction.
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=wxSimpleHtmlListBoxNameStr)
 Creates the HTML listbox for two-step construction.

List of all members.


Constructor & Destructor Documentation

wxSimpleHtmlListBox::wxSimpleHtmlListBox ( 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 = wxSimpleHtmlListBoxNameStr 
)

Constructor, creating and showing the HTML list box.

Parameters:
parentParent window. Must not be NULL.
idWindow identifier. A value of -1 indicates a default value.
posWindow position. If wxDefaultPosition is specified then a default position is chosen.
sizeWindow size. If wxDefaultSize is specified then the window is sized appropriately.
nNumber of strings with which to initialise the control.
choicesAn array of strings with which to initialise the control.
styleWindow style. See wxHLB_* flags.
validatorWindow validator.
nameWindow name.
wxSimpleHtmlListBox::wxSimpleHtmlListBox ( 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 = wxSimpleHtmlListBoxNameStr 
)

Constructor, creating and showing the HTML list box.

Parameters:
parentParent window. Must not be NULL.
idWindow identifier. A value of -1 indicates a default value.
posWindow position.
sizeWindow size. If wxDefaultSize is specified then the window is sized appropriately.
choicesAn array of strings with which to initialise the control.
styleWindow style. See wxHLB_* flags.
validatorWindow validator.
nameWindow name.
wxSimpleHtmlListBox::wxSimpleHtmlListBox ( )

Default constructor, you must call Create() later.

virtual wxSimpleHtmlListBox::~wxSimpleHtmlListBox ( ) [virtual]

Frees the array of stored items and relative client data.


Member Function Documentation

bool wxSimpleHtmlListBox::Create ( 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 = wxSimpleHtmlListBoxNameStr 
)

Creates the HTML listbox for two-step construction.

See wxSimpleHtmlListBox() for further details.

bool wxSimpleHtmlListBox::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 = wxSimpleHtmlListBoxNameStr 
)

Creates the HTML listbox for two-step construction.

See wxSimpleHtmlListBox() for further details.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines