#if defined(__WIN95__)
+#include "wx/app.h"
#include "wx/log.h"
#include "wx/dynarray.h"
#include "wx/imaglist.h"
if ( m_windowStyle & wxTR_LINES_AT_ROOT )
wstyle |= TVS_LINESATROOT;
+
+ if ( m_windowStyle & wxTR_FULL_ROW_HIGHLIGHT )
+ {
+ if ( wxTheApp->GetComCtl32Version() >= 471 )
+ wstyle |= TVS_FULLROWSELECT;
+ }
+
// using TVS_CHECKBOXES for emulation of a multiselection tree control
// doesn't work without the new enough headers
DoSetItem(&tvItem);
}
+void wxTreeCtrl::RefreshItem(const wxTreeItemId& item)
+{
+ wxRect rect;
+ if ( GetBoundingRect(item, rect) )
+ {
+ RefreshRect(rect);
+ }
+}
+
void wxTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
const wxColour& col)
{
}
attr->SetTextColour(col);
- Refresh();
+
+ RefreshItem(item);
}
void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
}
attr->SetBackgroundColour(col);
- Refresh();
+
+ RefreshItem(item);
}
void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
}
attr->SetFont(font);
- Refresh();
+
+ RefreshItem(item);
}
// ----------------------------------------------------------------------------
// FALSE means get item rect for the whole item, not only text
return SendMessage(GetHwnd(), TVM_GETITEMRECT, FALSE, (LPARAM)&rect) != 0;
-
}
bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const