1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<HTML>
<head><title>wxCheckListBox</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxchecklistbox"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx39.htm#wxcheckbox"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx41.htm#wxchoice"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxCheckListBox</H2>
<P>
A checklistbox is like a listbox, but allows items to be checked or unchecked.<P>
This class is currently implemented under Windows and GTK. When using this
class under Windows wxWindows must be compiled with USE_OWNER_DRAWN set to 1.<P>
Only the new functions for this class are documented; see also <A HREF="wx128.htm#wxlistbox">wxListBox</A>.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx128.htm#wxlistbox">wxListBox</A><BR>
<A HREF="wx56.htm#wxcontrol">wxControl</A><BR>
<A HREF="wx260.htm#wxwindow">wxWindow</A><BR>
<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/checklst.h><P>
<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
See <A HREF="wx128.htm#wxlistbox">wxListBox</A>.<P>
<B><FONT COLOR="#FF0000">Event handling</FONT></B><P>
<TABLE>
<TR><TD VALIGN=TOP>
<B>EVT_CHECKLISTBOX(id, func)</B>
</TD>
<TD VALIGN=TOP>
Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLE event,
when an item in the check list box is checked or unchecked.
</TD></TR>
</TABLE>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx128.htm#wxlistbox">wxListBox</A>, <A HREF="wx41.htm#wxchoice">wxChoice</A>, <A HREF="wx50.htm#wxcombobox">wxComboBox</A>, <A HREF="wx129.htm#wxlistctrl">wxListCtrl</A>,
<A HREF="wx52.htm#wxcommandevent">wxCommandEvent</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wxchecklistboxconstr">wxCheckListBox::wxCheckListBox</A><BR>
<A HREF="#topic76">wxCheckListBox::~wxCheckListBox</A><BR>
<A HREF="#wxchecklistboxcheck">wxCheckListBox::Check</A><BR>
<A HREF="#wxchecklistboxischecked">wxCheckListBox::IsChecked</A><BR>
<P>
<HR>
<A NAME="wxchecklistboxconstr"></A>
<H3>wxCheckListBox::wxCheckListBox</H3>
<P>
<B></B> <B>wxCheckListBox</B>()<P>
Default constructor.<P>
<B></B> <B>wxCheckListBox</B>(<B>wxWindow*</B><I> parent</I>, <B>wxWindowID</B><I> id</I>,
<B>const wxPoint&</B><I> pos = wxDefaultPosition</I>, <B>const wxSize&</B><I> size = wxDefaultSize</I>,
<B>int</B><I> n</I>, <B>const wxString </B><I>choices[] = NULL</I>,
<B>long</B><I> style = 0</I>, <B>const wxValidator& </B><I>validator = wxDefaultValidator</I>, <B>const wxString& </B><I>name = "listBox"</I>)<P>
Constructor, creating and showing a list box.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>parent</I><UL><UL>
Parent window. Must not be NULL.</UL></UL>
<P>
<I>id</I><UL><UL>
Window identifier. A value of -1 indicates a default value.</UL></UL>
<P>
<I>pos</I><UL><UL>
Window position.</UL></UL>
<P>
<I>size</I><UL><UL>
Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.</UL></UL>
<P>
<I>n</I><UL><UL>
Number of strings with which to initialise the control.</UL></UL>
<P>
<I>choices</I><UL><UL>
An array of strings with which to initialise the control.</UL></UL>
<P>
<I>style</I><UL><UL>
Window style. See <A HREF="wx40.htm#wxchecklistbox">wxCheckListBox</A>.</UL></UL>
<P>
<I>validator</I><UL><UL>
Window validator.</UL></UL>
<P>
<I>name</I><UL><UL>
Window name.</UL></UL>
<P>
<B><FONT COLOR="#0000C8">wxPython note:</FONT></B><BR>
The wxCheckListBox constructor in wxPython reduces the <TT>n</TT>
and <TT>choices</TT> arguments are to a single argument, which is
a list of strings.<P>
<HR>
<A NAME="topic76"></A>
<H3>wxCheckListBox::~wxCheckListBox</H3>
<P>
<B>void</B> <B>~wxCheckListBox</B>()<P>
Destructor, destroying the list box.<P>
<HR>
<A NAME="wxchecklistboxcheck"></A>
<H3>wxCheckListBox::Check</H3>
<P>
<B>void</B> <B>Check</B>(<B>int </B><I>item</I>, <B>bool</B><I> check = TRUE</I>)<P>
Checks the given item.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>item</I><UL><UL>
Index of item to check.</UL></UL>
<P>
<I>check</I><UL><UL>
TRUE if the item is to be checked, FALSE otherwise.</UL></UL>
<P>
<HR>
<A NAME="wxchecklistboxischecked"></A>
<H3>wxCheckListBox::IsChecked</H3>
<P>
<B>bool</B> <B>IsChecked</B>(<B>int</B><I> item</I>) <B>const</B><P>
Returns TRUE if the given item is checked, FALSE otherwise.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>item</I><UL><UL>
Index of item whose check status is to be returned.</UL></UL>
<P>
</BODY></HTML>
|