Home » Community » Newbie corner » GridCtrl scroll callback? (Does GridCtrl have a callback for when table is scrolled?)
GridCtrl scroll callback? [message #47617] |
Wed, 08 February 2017 15:44  |
roger
Messages: 9 Registered: August 2016
|
Promising Member |
|
|
I have a custom grid ctrl that is derived from GridCtrl:
class CustomGridCtrl : public CtrlMouseActions<GridCtrl>
. It sprouts scrollbars (presumably GridCtrl's ScrollBar elements, sbx and sby) whenever the panel in which it is displayed is resized too small to hold the entire table (grid). When it is scrolled (using the scrollbars or mouse wheel), I need a way to capture the new scroll position, but I cannot find the appropriate callback to hook. If I hook sby's WhenScroll callback (myGrid.sbx.WhenScroll=THISBACK(myCaptureRoutine) , then when I move the scrollbar slider (either by dragging or rolling the mousewheel while in the grid), I the SLIDER moves, and I can capture its new position, but the grid (table) no longer moves. I need the grid to scroll in response to the scrollbar. It's as if by hooking the scrollbar's WhenScroll callback, I'm only doing my capture callback routine, and the event is no longer relayed to the grid so that it will scroll too.
Is there a WhenScroll callback, or equivalent, for a GridCtrl (and if so, what is it)?
or am I looking at the wrong widget?
or is there a way that I can relay the scrollbar move event to the grid after I have captured the new position?
|
|
|
|
Goto Forum:
Current Time: Tue May 06 19:32:27 CEST 2025
Total time taken to generate the page: 0.03016 seconds
|