wxCheckListBox Class Reference
[Controls]

#include <wx/checklst.h>

Inheritance diagram for wxCheckListBox:

wxListBox wxControlWithItems wxControl wxItemContainer wxWindow wxItemContainerImmutable wxEvtHandler wxObject

List of all members.


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.

Only the new functions for this class are documented; see also wxListBox.

Please note that wxCheckListBox uses client data in its implementation, and therefore this is not available to the application.

Events:

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

void handlerFuncName(wxCommandEvent& event)

Event macros:
Library:  wxCore

Category:  Controls

See also:
wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent

Public Member Functions

 wxCheckListBox ()
virtual ~wxCheckListBox ()
void Check (unsigned int item, bool check=true)
bool IsChecked (unsigned int item) const
 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")
 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 & 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:
parent Parent window. Must not be NULL.
id Window identifier. The value wxID_ANY indicates a default value.
pos Window position.
size Window size. If wxDefaultSize is specified then the window is sized appropriately.
n Number of strings with which to initialise the control.
choices An array of strings with which to initialise the control.
style Window style. See wxCheckListBox.
validator Window validator.
name Window name.

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:
parent Parent window. Must not be NULL.
id Window identifier. The value wxID_ANY indicates a default value.
pos Window position.
size Window size. If wxDefaultSize is specified then the window is sized appropriately.
choices An array of strings with which to initialise the control.
style Window style. See wxCheckListBox.
validator Window validator.
name Window name.

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:
item Index of item to check.
check true if the item is to be checked, false otherwise.

bool wxCheckListBox::IsChecked ( unsigned int  item  )  const

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

Parameters:
item Index of item whose check status is to be returned.



wxWidgets logo

[ top ]