Gets the application-defined data associated with this item.
+\membersection{wxListCtrl::GetItemFont}\label{wxlistctrlgetitemfont}
+
+\constfunc{wxFont}{GetItemFont}{\param{long }{item}}
+
+Returns the item's font.
+
+
\membersection{wxListCtrl::GetItemPosition}\label{wxlistctrlgetitemposition}
\constfunc{bool}{GetItemPosition}{\param{long }{item}, \param{wxPoint\& }{pos}}
Associates application-defined data with this item.
+\membersection{wxListCtrl::SetItemFont}\label{wxlistctrlsetitemfont}
+
+\func{void}{SetItemFont}{\param{long }{item}, \param{const wxFont\& }{font}}
+
+Sets the item's font.
+
+
\membersection{wxListCtrl::SetItemImage}\label{wxlistctrlsetitemimage}
\func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}}
wxColour GetItemTextColour( long item ) const;
void SetItemBackgroundColour( long item, const wxColour &col);
wxColour GetItemBackgroundColour( long item ) const;
+#if wxABI_VERSION >= 20602
+ void SetItemFont( long item, const wxFont &f);
+ wxFont GetItemFont( long item ) const;
+#endif
int GetSelectedItemCount() const;
wxColour GetTextColour() const;
void SetTextColour(const wxColour& col);
void SetItemBackgroundColour( long item, const wxColour &col);
wxColour GetItemBackgroundColour( long item ) const;
+#if wxABI_VERSION >= 20602
+ // Font of an item.
+ void SetItemFont( long item, const wxFont &f);
+ wxFont GetItemFont( long item ) const;
+#endif
+
// Gets the number of selected items in the list control
int GetSelectedItemCount() const;
m_listCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE );
m_listCtrl->SetColumnWidth( 1, wxLIST_AUTOSIZE );
m_listCtrl->SetColumnWidth( 2, wxLIST_AUTOSIZE );
+
+ // test SetItemFont too
+ m_listCtrl->SetItemFont(0, *wxITALIC_FONT);
}
void MyFrame::InitWithIconItems(bool withText, bool sameIcon)
return info.GetBackgroundColour();
}
+void wxGenericListCtrl::SetItemFont( long item, const wxFont &f )
+{
+ wxListItem info;
+ info.m_itemId = item;
+ info.SetFont( f );
+ m_mainWin->SetItem( info );
+}
+
+wxFont wxGenericListCtrl::GetItemFont( long item ) const
+{
+ wxListItem info;
+ info.m_itemId = item;
+ m_mainWin->GetItem( info );
+ return info.GetFont();
+}
+
int wxGenericListCtrl::GetSelectedItemCount() const
{
return m_mainWin->GetSelectedItemCount();
return col;
}
+void wxListCtrl::SetItemFont( long item, const wxFont &f )
+{
+ wxListItem info;
+ info.m_itemId = item;
+ info.SetFont( f );
+ SetItem( info );
+}
+
+wxFont wxListCtrl::GetItemFont( long item ) const
+{
+ wxFont f;
+ wxListItemInternalData *data = wxGetInternalData(this, item);
+ if ( data && data->attr )
+ f = data->attr->GetFont();
+
+ return f;
+}
+
// Gets the number of selected items in the list control
int wxListCtrl::GetSelectedItemCount() const
{
*wxXmlResource*Unload*wxString*;
*wxXmlResource*IsArchive*wxString*;
*wxShadowObject*;
+ *wxGenericListCtrl*SetItemFont*wxFont*;
+ *wxGenericListCtrl*GetItemFont*;
};