Added {S,G}etItem{Text,Background}Colour methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,10 @@ public:
|
|||||||
int GetColumnCount() const;
|
int GetColumnCount() const;
|
||||||
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
||||||
int GetItemSpacing( bool isSmall ) const;
|
int GetItemSpacing( bool isSmall ) const;
|
||||||
|
void SetItemTextColour( long item, const wxColour& col);
|
||||||
|
wxColour GetItemTextColour( long item ) const;
|
||||||
|
void SetItemBackgroundColour( long item, const wxColour &col);
|
||||||
|
wxColour GetItemBackgroundColour( long item ) const;
|
||||||
int GetSelectedItemCount() const;
|
int GetSelectedItemCount() const;
|
||||||
wxColour GetTextColour() const;
|
wxColour GetTextColour() const;
|
||||||
void SetTextColour(const wxColour& col);
|
void SetTextColour(const wxColour& col);
|
||||||
@@ -218,3 +222,5 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __LISTCTRLH_G__
|
#endif // __LISTCTRLH_G__
|
||||||
|
|
||||||
|
// vi:sts=4:sw=4:et
|
||||||
|
@@ -191,6 +191,14 @@ public:
|
|||||||
// view, otherwise the large icon view.
|
// view, otherwise the large icon view.
|
||||||
int GetItemSpacing(bool isSmall) const;
|
int GetItemSpacing(bool isSmall) const;
|
||||||
|
|
||||||
|
// Foreground colour of an item.
|
||||||
|
void SetItemTextColour( long item, const wxColour& col);
|
||||||
|
wxColour GetItemTextColour( long item ) const;
|
||||||
|
|
||||||
|
// Background colour of an item.
|
||||||
|
void SetItemBackgroundColour( long item, const wxColour &col);
|
||||||
|
wxColour GetItemBackgroundColour( long item ) const;
|
||||||
|
|
||||||
// Gets the number of selected items in the list control
|
// Gets the number of selected items in the list control
|
||||||
int GetSelectedItemCount() const;
|
int GetSelectedItemCount() const;
|
||||||
|
|
||||||
@@ -395,3 +403,5 @@ private:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_LISTCTRL_H_
|
// _WX_LISTCTRL_H_
|
||||||
|
|
||||||
|
// vi:sts=4:sw=4:et
|
||||||
|
@@ -4837,6 +4837,38 @@ int wxListCtrl::GetItemSpacing( bool isSmall ) const
|
|||||||
return m_mainWin->GetItemSpacing( isSmall );
|
return m_mainWin->GetItemSpacing( isSmall );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxListCtrl::SetItemTextColour( long item, const wxColour &col )
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
info.SetTextColour( col );
|
||||||
|
m_mainWin->SetItem( info );
|
||||||
|
}
|
||||||
|
|
||||||
|
wxColour wxListCtrl::GetItemTextColour( long item ) const
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
m_mainWin->GetItem( info );
|
||||||
|
return info.GetTextColour();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxListCtrl::SetItemBackgroundColour( long item, const wxColour &col )
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
info.SetBackgroundColour( col );
|
||||||
|
m_mainWin->SetItem( info );
|
||||||
|
}
|
||||||
|
|
||||||
|
wxColour wxListCtrl::GetItemBackgroundColour( long item ) const
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
m_mainWin->GetItem( info );
|
||||||
|
return info.GetBackgroundColour();
|
||||||
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetSelectedItemCount() const
|
int wxListCtrl::GetSelectedItemCount() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetSelectedItemCount();
|
return m_mainWin->GetSelectedItemCount();
|
||||||
@@ -5265,3 +5297,5 @@ void wxListCtrl::Thaw()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTCTRL
|
#endif // wxUSE_LISTCTRL
|
||||||
|
|
||||||
|
// vi:sts=4:sw=4:et
|
||||||
|
@@ -910,6 +910,38 @@ int wxListCtrl::GetItemSpacing(bool isSmall) const
|
|||||||
return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);
|
return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxListCtrl::SetItemTextColour( long item, const wxColour &col )
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
info.SetTextColour( col );
|
||||||
|
SetItem( info );
|
||||||
|
}
|
||||||
|
|
||||||
|
wxColour wxListCtrl::GetItemTextColour( long item ) const
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
GetItem( info );
|
||||||
|
return info.GetTextColour();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxListCtrl::SetItemBackgroundColour( long item, const wxColour &col )
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
info.SetBackgroundColour( col );
|
||||||
|
SetItem( info );
|
||||||
|
}
|
||||||
|
|
||||||
|
wxColour wxListCtrl::GetItemBackgroundColour( long item ) const
|
||||||
|
{
|
||||||
|
wxListItem info;
|
||||||
|
info.m_itemId = item;
|
||||||
|
GetItem( info );
|
||||||
|
return info.GetBackgroundColour();
|
||||||
|
}
|
||||||
|
|
||||||
// Gets the number of selected items in the list control
|
// Gets the number of selected items in the list control
|
||||||
int wxListCtrl::GetSelectedItemCount() const
|
int wxListCtrl::GetSelectedItemCount() const
|
||||||
{
|
{
|
||||||
@@ -2407,3 +2439,5 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTCTRL
|
#endif // wxUSE_LISTCTRL
|
||||||
|
|
||||||
|
// vi:sts=4:sw=4:et
|
||||||
|
Reference in New Issue
Block a user