Hi, your scrollbars are part of control? I mean, are they created via ShowScrollBar(Handle, SB_HORZ, True); ShowScrollBar(Handle, SB_VERT, True); ? You wrote component ECScheme, it is part of ECControls and I didn't use DoMouseWheelxxx methods at all. I use procedure WMHScroll(var Msg: TWMScroll); message WM_HSCROLL; procedure WMVScroll(var Msg: TWMScroll); message WM_VSCROLL; instead to update area and it works well. V. ______________________________________________________________
Od: Martok via Lazarus <[email protected]> Komu: [email protected] Datum: 03.10.2017 18:32 Předmět: [Lazarus] Mousewheel events on TCustomControl
Hi all, I'm having some strange trouble with mouse interaction with a TCustomControl-derived component. I have only been able to test with the win32 widgetset, and it works on some machines and doesn't work on others. The component draws its content to its TCanvas, and additionally places some controls in its client space. Specifically, TScrollBars which the user can use to scroll segments of the content. I want to add mouse wheel scrolling in the client area, so I overwrite DoMouseWheel and put my handling there. This works well on some systems, but for others (including my main development system), the MouseWheel message is not delivered to the CustomControl, but instead to what appears to be the first TScrollbar (not necessarily the focused control). The component never receives it. Do you have an idea what could be happening here, and how I could fix that? MouseCapture might be an idea, but all examples I've seen don't seem very reliable at un-capturing. I also want the solution to be stable across other widgetsets... -- Martok -- _______________________________________________ Lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus>
-- _______________________________________________ Lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
