protected:
// implement/override wxHeaderCtrl functions by forwarding them to the main
// control
- virtual wxHeaderColumn& GetColumn(unsigned int idx)
+ virtual const wxHeaderColumn& GetColumn(unsigned int idx) const
{
return *(GetOwner()->GetColumn(idx));
}
{
case WXK_RETURN:
{
- if (m_currentRow > 0)
+ if (m_currentRow >= 0)
{
wxWindow *parent = GetParent();
wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, parent->GetId());
wxDataViewRenderer *cell = col->GetRenderer();
unsigned int current = GetLineAt( y );
- if ((current > GetRowCount()) || (x > GetEndOfLastCol()))
+ if ((current >= GetRowCount()) || (x > GetEndOfLastCol()))
{
// Unselect all if below the last row ?
return;
// select single line
SelectAllRows( false );
SelectRow( m_lineSelectSingleOnUp, true );
+ SendSelectionChangedEvent( GetItemByRow(m_lineSelectSingleOnUp) );
}
//Process the event of user clicking the expander
void wxDataViewCtrl::EnsureVisible( const wxDataViewItem & item, const wxDataViewColumn * column )
{
+ wxDataViewCtrlBase::EnsureVisible( item, column );
+
+ m_clientArea->RecalculateDisplay();
+
int row = m_clientArea->GetRowByItem(item);
if( row >= 0 )
{