Two missing #includes in image code.

Corrected item coloring in wxListCtrl report mode (incl sample).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-12-04 11:56:28 +00:00
parent 58c837a4e6
commit f6b7723929
4 changed files with 21 additions and 2 deletions

View File

@@ -609,6 +609,7 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
if (m_mode == wxLC_REPORT)
{
wxString s;
wxColour *colour = (wxColour*) NULL;
wxNode *node = m_items.First();
while (node)
{
@@ -622,13 +623,15 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
m_owner->GetImageSize( item->GetImage(), x, y );
x += item->GetX() + 5;
}
if (!colour)
colour = item->GetColour();
if (item->HasText())
{
item->GetText( s );
if (hilight)
dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
else
dc->SetTextForeground( *item->GetColour() );
dc->SetTextForeground( *colour );
dc->DrawText( s, x, item->GetY() );
}
dc->DestroyClippingRegion();