X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fcd0bf7f313e637e8cd4b5d7f3cd5b294fec033..c699b4583b6047191ac326728654c6fe8920aa7b:/docs/latex/wx/listctrl.tex diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index 8f031edd97..ac0fdfb739 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -55,6 +55,10 @@ mac.listctrl.always\_use\_generic \helpref{wxSystemOption}{wxsystemoptions} to +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Window styles} \twocolwidtha{7cm} @@ -111,6 +115,22 @@ functions that take a \helpref{wxListEvent}{wxlistevent} argument. \twocolitem{{\bf EVT\_LIST\_CACHE\_HINT(id, func)}}{Prepare cache for a virtual list control} \end{twocollist}% +\wxheading{Column ordering} + +In report view, the control has several columns which are identified by their +internal indices. By default, these indices correspond to their order on +screen, i.e. the column $0$ appears first (in the left-to-right or maybe +right-to-left if the current language uses this writing direction), the column +$1$ next and so on. However it is possible to reorder the columns visual order +using \helpref{SetColumnsOrder}{wxlistctrlsetcolumnsorder} method and the +user can also rearrange the columns interactively by dragging them. In this +case, the index of the column is not the same as its order and the functions +\helpref{GetColumnOrder}{wxlistctrlgetcolumnorder} and +\helpref{GetColumnIndexFromOrder}{wxlistctrlgetcolumnindexfromorder} should be +used to translate between them. + +Please notice that current column reordering is implemented only in wxMSW. + \wxheading{See also} \helpref{wxListCtrl overview}{wxlistctrloverview}, \helpref{wxListView}{wxlistview}, \helpref{wxListBox}{wxlistbox},\rtfsp @@ -256,7 +276,7 @@ Ensures this item is visible. \membersection{wxListCtrl::FindItem}\label{wxlistctrlfinditem} -\func{long}{FindItem}{\param{long }{start}, \param{const wxString\& }{str}, \param{const bool }{partial = false}} +\func{long}{FindItem}{\param{long }{start}, \param{const wxString\& }{str}, \param{bool }{partial = false}} Find an item whose label matches this string, starting from {\it start} or the beginning if {\it start} is -1. The string comparison is case @@ -317,6 +337,28 @@ Returns the number of columns. Gets the column width (report view only). +\membersection{wxListCtrl::GetColumnIndexFromOrder}\label{wxlistctrlgetcolumnindexfromorder} + +\constfunc{int}{GetColumnIndexFromOrder}{\param{int }{order}} + +Gets the column number by visual order index (report view only). + + +\membersection{wxListCtrl::GetColumnOrder}\label{wxlistctrlgetcolumnorder} + +\constfunc{int}{GetColumnOrder}{\param{int }{col}} + +Gets the column visual order index (valid in report view only). + + +\membersection{wxListCtrl::GetColumnsOrder}\label{wxlistctrlgetcolumnsorder} + +\constfunc{wxArrayInt}{GetColumnsOrder}{\void} + +Returns the array containing the orders of all columns. On error, an empty +array is returned. + + \membersection{wxListCtrl::GetCountPerPage}\label{wxlistctrlgetcountperpage} \constfunc{int}{GetCountPerPage}{\void} @@ -832,6 +874,17 @@ will resize the column to the length of the header (Win32) or 80 pixels (other p In small or normal icon view, {\it col} must be -1, and the column width is set for all columns. +\membersection{wxListCtrl::SetColumnsOrder}\label{wxlistctrlsetcolumnsorder} + +\constfunc{bool}{SetColumnOrder}{\param{const wxArrayInt\& }{orders}} + +Sets the order of all columns at once. The \arg{orders} array must have the +same number elements as the number of columns and contain each position exactly +once. + +This function is valid in report view only. + + \membersection{wxListCtrl::SetImageList}\label{wxlistctrlsetimagelist} \func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{int }{which}} @@ -971,7 +1024,7 @@ used. \membersection{wxListCtrl::SetItemColumnImage}\label{wxlistctrlsetitemcolumnimage} -\func{bool}{SetItemImage}{\param{long }{item}, \param{long }{column}\param{int }{image}} +\func{bool}{SetItemColumnImage}{\param{long }{item}, \param{long }{column}, \param{int }{image}} Sets the image associated with the item. In report view, you can specify the column. The image is an index into the image list associated with the list control. @@ -1024,7 +1077,7 @@ The colour can be retrieved using \membersection{wxListCtrl::SetSingleStyle}\label{wxlistctrlsetsinglestyle} -\func{void}{SetSingleStyle}{\param{long }{style}, \param{const bool }{add = true}} +\func{void}{SetSingleStyle}{\param{long }{style}, \param{bool }{add = true}} Adds or removes a single window style.