|| | |||Browse by category|
When a column is larger than a view, is it possible to incrementally scroll that one column? It seems as if Objective Grid always scrolls a whole column.
This is because Objective Grid doesn?t support incremental scrolling, but here are two workarounds to this limitation:
Here are the steps for scrolling on a lower interval than the default.
- Use covered cells. Check out the SmoothCol sample.
- If you are using the Grid in a CView (this workaround won't help if you are using the grid in a dialog), you can derive your view from a CScrollView instead of usual CView. The base class CScrollView will provide incremental scrolling.
- This is really simple.
- Derive your view class from CScrollView.
- Override OnInitialUpdate() as follows:
// Modify this to suit your needs.
// TODO: calculate the total size of this view
sizeTotal.cy = m_gridWnd->CalcSumOfRowHeights(0,m_gridWnd->GetRowCount());
//This will help incremental scrolling...
m_gridWnd is a member variable declared as below: