]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/vlbox.tex
added a way to create fonts with specified pixel size
[wxWidgets.git] / docs / latex / wx / vlbox.tex
index 5b3f77a0aec510cdd6de7229c59facf2cad76fb1..1050b7f80e112f62df6a49c5e2fcf864b640f971 100644 (file)
@@ -6,7 +6,7 @@
 %% Created:     01.06.03
 %% RCS-ID:      $Id$
 %% Copyright:   (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
 %% Created:     01.06.03
 %% RCS-ID:      $Id$
 %% Copyright:   (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
-%% License:     wxWindows license
+%% License:     wxWidgets license
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \section{\class{wxVListBox}}\label{wxvlistbox}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \section{\class{wxVListBox}}\label{wxvlistbox}
@@ -95,7 +95,7 @@ This method is only valid for multi selection listboxes.
 Returns the index of the first selected item in the listbox or 
 {\tt wxNOT\_FOUND} if no items are currently selected.
 
 Returns the index of the first selected item in the listbox or 
 {\tt wxNOT\_FOUND} if no items are currently selected.
 
-{\it cookie} is an opaque parameter which should be passed to the subsequent
+\arg{cookie} is an opaque parameter which should be passed to the subsequent
 calls to \helpref{GetNextSelected}{wxvlistboxgetnextselected}. It is needed in
 order to allow parallel iterations over the selected items.
 
 calls to \helpref{GetNextSelected}{wxvlistboxgetnextselected}. It is needed in
 order to allow parallel iterations over the selected items.
 
@@ -173,6 +173,19 @@ may only return $0$ or $1$ however.
 Get the currently selected item or $-1$ if there is no selection.
 
 
 Get the currently selected item or $-1$ if there is no selection.
 
 
+\membersection{wxVListBox::GetSelectionBackground}\label{wxvlistboxgetselectionbackground}
+
+\constfunc{const wxColour\&}{GetSelectionBackground}{\void}
+
+Returns the background colour used for the selected cells. By default the
+standard system colour is used.
+
+\wxheading{See also}
+
+\helpref{wxSystemSettings::GetColour}{wxsystemsettingsgetcolour},\\
+\helpref{SetSelectionBackground}{wxvlistboxsetselectionbackground}
+
+
 \membersection{wxVListBox::HasMultipleSelection}\label{wxvlistboxishasmultipleselection}
 
 \constfunc{bool}{HasMultipleSelection}{\void}
 \membersection{wxVListBox::HasMultipleSelection}\label{wxvlistboxishasmultipleselection}
 
 \constfunc{bool}{HasMultipleSelection}{\void}
@@ -202,6 +215,19 @@ current.
 Returns {\tt true} if this item is selected, {\tt false} otherwise.
 
 
 Returns {\tt true} if this item is selected, {\tt false} otherwise.
 
 
+\membersection{wxVListBox::OnDrawBackground}\label{wxvlistboxondrawbackground}
+
+\constfunc{void}{OnDrawBackground}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}, \param{size\_t }{n}}
+
+This method is used to draw the items background and, maybe, a border
+around it.
+
+The base class version implements a reasonable default behaviour which
+consists in drawing the selected item with the standard background
+colour and drawing a border around the item if it is either selected or
+current.
+
+
 \membersection{wxVListBox::OnDrawItem}\label{wxvlistboxondrawitem}
 
 \constfunc{void}{OnDrawItem}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}, \param{size\_t }{n}}
 \membersection{wxVListBox::OnDrawItem}\label{wxvlistboxondrawitem}
 
 \constfunc{void}{OnDrawItem}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}, \param{size\_t }{n}}
@@ -291,6 +317,7 @@ This method is only valid for multi selection listboxes.
 
 \helpref{SelectAll}{wxvlistboxselectall}, \helpref{Select}{wxvlistboxselect}
 
 
 \helpref{SelectAll}{wxvlistboxselectall}, \helpref{Select}{wxvlistboxselect}
 
+\membersection{wxVListBox::SetItemCount}\label{wxvlistboxsetitemcount}
 
 \func{void}{SetItemCount}{\param{size\_t }{count}}
 
 
 \func{void}{SetItemCount}{\param{size\_t }{count}}
 
@@ -321,12 +348,27 @@ Set the selection to the specified item, if it is $-1$ the selection is
 unset. The selected item will be automatically scrolled into view if it isn't
 currently visible.
 
 unset. The selected item will be automatically scrolled into view if it isn't
 currently visible.
 
+This method may be used both with single and multiple selection listboxes.
+
+
+\membersection{wxVListBox::SetSelectionBackground}\label{wxvlistboxsetselectionbackground}
+
+\func{void}{SetSelectionBackground}{\param{const wxColour\& }{col}}
+
+Sets the colour to be used for the selected cells background. The background of
+the standard cells may be changed by simply calling 
+\helpref{SetBackgroundColour}{wxwindowsetbackgroundcolour}.
+
+\wxheading{See also}
+
+\helpref{GetSelectionBackground}{wxvlistboxgetselectionbackground}
+
 
 \membersection{wxVListBox::Toggle}\label{wxvlistboxtoggle}
 
 \func{void}{Toggle}{\param{size\_t }{item}}
 
 
 \membersection{wxVListBox::Toggle}\label{wxvlistboxtoggle}
 
 \func{void}{Toggle}{\param{size\_t }{item}}
 
-Toggles the state of the specified {\it item}, i.e. selects it if it was
+Toggles the state of the specified \arg{item}, i.e. selects it if it was
 unselected and deselects it if it was selected.
 
 This method is only valid for multi selection listboxes.
 unselected and deselects it if it was selected.
 
 This method is only valid for multi selection listboxes.