Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
roger is currently offline  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)Wink, 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?
 
Read Message
Read Message
Previous Topic: Issue with Color.h...
Next Topic: Separate Info Window
Goto Forum:
  


Current Time: Sun Apr 28 16:46:57 CEST 2024

Total time taken to generate the page: 0.03641 seconds