{
if (attr != new_attr)
{
- // "Delete" (i.e. DecRef) the old attribute.
+ // "Delete" (i.e. DecRef) the old attribute.
attr->DecRef();
attr = new_attr;
// Take ownership of the new attribute, i.e. no IncRef.
if ( y >= h )
y = wxMax( h - 1, 0 );
- // do set scrollbar parameters
+ // update the virtual size and refresh the scrollbars to reflect it
SetScrollRate(m_scrollLineX, m_scrollLineY);
m_gridWin->SetVirtualSize(w, h);
Scroll(x, y);
+ AdjustScrollbars();
// if our OnSize() hadn't been called (it would if we have scrollbars), we
// still must reposition the children
// wxSafeDecRec(...) might cause event processing that accesses
// the cached attribute, if one exists (e.g. by deleting the
// editor stored within the attribute). Therefore it is important
- // to invalidate the cache before calling wxSafeDecRef!
+ // to invalidate the cache before calling wxSafeDecRef!
wxSafeDecRef(oldAttr);
}
}
wxClientDC dc(m_rowLabelWin);
dc.SetFont(GetLabelFont());
StringToLines(GetRowLabelValue( row ), lines);
- GetTextBoxSize( dc, lines, &w, &h );
- //check that it is not less than the minimal height
- height = wxMax(h, GetRowMinimalAcceptableHeight());
+ GetTextBoxSize( dc, lines, &w, &h );
+ //check that it is not less than the minimal height
+ height = wxMax(h, GetRowMinimalAcceptableHeight());
}
// See comment in SetColSize
else
GetTextBoxSize( dc, lines, &h, &w );
width = w + 6;
- //check that it is not less than the minimal width
- width = wxMax(width, GetColMinimalAcceptableWidth());
+ //check that it is not less than the minimal width
+ width = wxMax(width, GetColMinimalAcceptableWidth());
}
// should we check that it's bigger than GetColMinimalWidth(col) here?