int numColumns = m_owner->GetColumnCount();
wxListItem item;
- for (int i = 0; i < numColumns; i++)
+ for ( int i = 0; i < numColumns && x < w; i++ )
{
m_owner->GetColumn( i, item );
int wCol = item.m_width;
dc.DrawText( item.GetText(),
x + EXTRA_WIDTH, HEADER_OFFSET_Y + EXTRA_HEIGHT );
- if ( x > w - wCol + 5 )
- break;
-
x += wCol;
}
+
dc.EndDrawing();
}
for ( size_t line = from; line <= to; line++ )
{
- if ( IsHighlighted(line) )
+ if ( IsHighlighted(line) || (line == m_current) )
{
if ( line < selMin )
selMin = line;
// EVT_KILL_FOCUS before which means that we finish by redrawing the items
// which are already drawn correctly resulting in horrible flicker - avoid
// it
- if ( m_hasFocus )
- return;
+ if ( !m_hasFocus )
+ {
+ m_hasFocus = TRUE;
- m_hasFocus = TRUE;
+ RefreshSelected();
+ }
- if (!GetParent())
+ if ( !GetParent() )
return;
- RefreshSelected();
-
#ifdef __WXGTK__
g_focusWindow = GetParent();
#endif
{
size_t count = m_mainWin->m_columns.GetCount();
for ( size_t n = 0; n < count; n++ )
- DeleteColumn(n);
+ DeleteColumn(0);
return TRUE;
}