X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d34d31f6d62dadc35ade1fc4308add7552b2877e..22a3b6e4b2010f425a54708e46b1b463bd2817a7:/interface/wx/listctrl.h?ds=sidebyside diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h index 41347abe1f..5b955e12c4 100644 --- a/interface/wx/listctrl.h +++ b/interface/wx/listctrl.h @@ -267,7 +267,7 @@ enum @library{wxcore} @category{ctrl} - @appearance{listctrl.png} + @appearance{listctrl} @see @ref overview_listctrl, wxListView, wxListBox, wxTreeCtrl, wxImageList, wxListEvent, wxListItem, wxEditableListBox @@ -407,6 +407,27 @@ public: wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + /** + Enable alternating row background colours (also called zebra striping). + + This method can only be called for the control in virtual report mode, + i.e. having ::wxLC_REPORT and ::wxLC_VIRTUAL styles. + + When enabling alternating colours, the appropriate colour for the even + rows is chosen automatically depending on the default foreground and + background colours which are used for the odd rows. + + @param enable + If @true, enable alternating row background colours, i.e. different + colours for the odd and even rows. If @false, disable this feature + and use the same background colour for all rows. + + @since 2.9.5 + + @see SetAlternateRowColour() + */ + void EnableAlternateRowColours(bool enable = true); + /** Enable or disable a beep if there is no match for the currently entered text when searching for the item from keyboard. @@ -417,7 +438,7 @@ public: @since 2.9.5 */ - void EnableBellOnNoMatch(bool on); + void EnableBellOnNoMatch(bool on = true); /** Finish editing the label. @@ -750,6 +771,26 @@ public: */ wxRect GetViewRect() const; + /** + Set the alternative row background colour to a specific colour. + + It is recommended to call EnableAlternateRowColours() instead of using + these methods as native implementations of this control might support + alternating row colours but not setting the exact colour to be used for + them. + + As EnableAlternateRowColours(), this method can only be used with + controls having ::wxLC_REPORT and ::wxLC_VIRTUAL styles. + + @param colour + A valid alternative row background colour to enable alternating + rows or invalid colour to disable them and use the same colour for + all rows. + + @since 2.9.5 + */ + void SetAlternateRowColour(const wxColour& colour); + /** Determines which item (if any) is at the specified point, giving details in @a flags. Returns index of the item or @c wxNOT_FOUND if no item is at @@ -1295,7 +1336,7 @@ protected: @endEventTable - @library{wxbase} + @library{wxcore} @category{events} @see wxListCtrl @@ -1412,7 +1453,7 @@ wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED; Represents the attributes (color, font, ...) of a wxListCtrl's wxListItem. - @library{wxbase} + @library{wxcore} @category{data} @see @ref overview_listctrl, wxListCtrl, wxListItem @@ -1496,7 +1537,7 @@ public: @library{wxcore} @category{ctrl} - @appearance{listview.png} + @appearance{listview} @see wxListView::SetColumnImage */ @@ -1614,7 +1655,7 @@ public: or SetFont() functions on it passing it the colour/font to use. If the colour/font is not specified, the default list control colour/font is used. - @library{wxbase} + @library{wxcore} @category{data} @see wxListCtrl