Version: 2.9.4
Public Member Functions
wxCheckListBox Class Reference

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

Inheritance diagram for wxCheckListBox:

Detailed Description

A wxCheckListBox is like a wxListBox, but allows items to be checked or unchecked.

When using this class under Windows wxWidgets must be compiled with wxUSE_OWNER_DRAWN set to 1.

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxCommandEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
参照:
wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent

Public Member Functions

 wxCheckListBox ()
 Default constructor.
bool Create (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int nStrings=0, const wxString choices[]=NULL, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr)
 Creates the listbox for two-step construction.
bool Create (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const wxArrayString &choices, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListBoxNameStr)
 Creates the listbox for two-step construction.
virtual ~wxCheckListBox ()
 Destructor, destroying the list box.
void Check (unsigned int item, bool check=true)
 Checks the given item.
bool IsChecked (unsigned int item) const
 Returns true if the given item is checked, false otherwise.
 wxCheckListBox (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, int n=0, const wxString choices[]=NULL, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name="listBox")
 Constructor, creating and showing a list box.
 wxCheckListBox (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const wxArrayString &choices, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name="listBox")
 Constructor, creating and showing a list box.

List of all members.


Constructor & Destructor Documentation

wxCheckListBox::wxCheckListBox ( )

Default constructor.

wxCheckListBox::wxCheckListBox ( wxWindow parent,
wxWindowID  id,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
int  n = 0,
const wxString  choices[] = NULL,
long  style = 0,
const wxValidator validator = wxDefaultValidator,
const wxString name = "listBox" 
)

Constructor, creating and showing a list box.

Parameters:
parentParent window. Must not be NULL.
idWindow identifier. The value wxID_ANY 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 wxCheckListBox.
validatorWindow validator.
nameWindow name.

wxPerl Note: Not supported by wxPerl.

wxCheckListBox::wxCheckListBox ( wxWindow parent,
wxWindowID  id,
const wxPoint pos,
const wxSize size,
const wxArrayString choices,
long  style = 0,
const wxValidator validator = wxDefaultValidator,
const wxString name = "listBox" 
)

Constructor, creating and showing a list box.

Parameters:
parentParent window. Must not be NULL.
idWindow identifier. The value wxID_ANY 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 wxCheckListBox.
validatorWindow validator.
nameWindow name.

wxPerl Note: Use an array reference for the choices parameter.

virtual wxCheckListBox::~wxCheckListBox ( ) [virtual]

Destructor, destroying the list box.


Member Function Documentation

void wxCheckListBox::Check ( unsigned int  item,
bool  check = true 
)

Checks the given item.

Note that calling this method does not result in a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event being emitted.

Parameters:
itemIndex of item to check.
checktrue if the item is to be checked, false otherwise.
bool wxCheckListBox::Create ( wxWindow parent,
wxWindowID  id,
const wxPoint pos,
const wxSize size,
const wxArrayString choices,
long  style = 0,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxListBoxNameStr 
)

Creates the listbox for two-step construction.

See wxListBox() for further details.

Reimplemented from wxListBox.

bool wxCheckListBox::Create ( wxWindow parent,
wxWindowID  id,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
int  n = 0,
const wxString  choices[] = NULL,
long  style = 0,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxListBoxNameStr 
)

Creates the listbox for two-step construction.

See wxListBox() for further details.

Reimplemented from wxListBox.

bool wxCheckListBox::IsChecked ( unsigned int  item) const

Returns true if the given item is checked, false otherwise.

Parameters:
itemIndex of item whose check status is to be returned.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines