int state = 0;
if (m_parent->IsEnabled())
{
- if (i == m_hover)
+ if ((int) i == m_hover)
state = wxCONTROL_CURRENT;
}
else
case wxALIGN_LEFT:
x += HEADER_HORIZ_BORDER;
break;
+ case wxALIGN_RIGHT:
+ x += cw - titleSz.GetWidth() - HEADER_HORIZ_BORDER;
+ break;
+ default:
case wxALIGN_CENTER:
case wxALIGN_CENTER_HORIZONTAL:
x += (cw - titleSz.GetWidth() - 2 * HEADER_HORIZ_BORDER)/2;
break;
- case wxALIGN_RIGHT:
- x += cw - titleSz.GetWidth() - HEADER_HORIZ_BORDER;
- break;
}
// always center the title vertically:
if( column != -1 )
{
wxRect rect = GetClientRect();
- unsigned int colnum = 0;
- unsigned int x_start = 0, x_end = 0, w = 0;
+ int colnum = 0;
+ int x_start = 0, x_end = 0, w = 0;
int xx, yy, xe;
m_owner->CalcUnscrolledPosition( rect.x, rect.y, &xx, &yy );
for (x_start = 0; colnum < column; colnum++)
RefreshRow( m_currentRow );
}
- //EnsureVisible( m_currentRow );
+ GetOwner()->EnsureVisible( m_currentRow, -1 );
}
wxRect wxDataViewMainWindow::GetLineRect( unsigned int row ) const
}
wxDataViewTreeNodes nodes = node->GetNodes();
- int i = 0;
+ unsigned int i = 0;
for (; i < nodes.GetCount(); i ++)
{
if (nodes[i]->GetItem() == (**iter))
wxDataViewItemArray children;
unsigned int num = model->GetChildren( item, children);
- int index = 0;
+ unsigned int index = 0;
while( index < num )
{
if( model->IsContainer( children[index] ) )
wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int pos ) const
{
wxDataViewColumnList::const_iterator iter;
- int i = 0;
+ unsigned int i = 0;
for (iter = m_cols.begin(); iter!=m_cols.end(); iter++)
{
if (i == pos)
{
if( row < 0 )
row = 0;
- if( row > m_clientArea->GetRowCount() )
+ if( row > (int) m_clientArea->GetRowCount() )
row = m_clientArea->GetRowCount();
int first = m_clientArea->GetFirstVisibleRow();