How can you activate the xbeM_Wheel in a DCDIALOG
Posted: Fri Mar 07, 2025 10:45 am
Hi Roger
How can you activate the xbeM_Wheel in a DCDIALOG
How can you activate the xbeM_Wheel in a DCDIALOG
Donnay Software Web Forums
http://donnay-software.com/DONNAY/
Code: Select all
FUNCTION MyHandler(nEvent, mp1, mp2, oXbp, ..., oMyObject)
LOCAL nMove
DO CASE
CASE nEvent = xbeM_Wheel .AND. MousePointsOn(oMyObject)
* mp2[2] tells you the count of lines the wheel sends, number can be negative (lines up)
oMyObject:SetSize/SetPos/DoWhatEver
...
Tom wrote: ↑Sat Mar 08, 2025 1:50 am Hi, Nolberto.
If you want to deal with wheel events besides what's happening automatically (scroll bars, tables), catch "xbeM_Wheel" in a custom handler (use HANDLER or HANDLERBLOCK, look at the docs for DCREADGUI) and find out whether the mouse pointer is above the control you want to behave depending on the wheel.
Code: Select all
FUNCTION MyHandler(nEvent, mp1, mp2, oXbp, ..., oMyObject) LOCAL nMove DO CASE CASE nEvent = xbeM_Wheel .AND. MousePointsOn(oMyObject) * mp2[2] tells you the count of lines the wheel sends, number can be negative (lines up) oMyObject:SetSize/SetPos/DoWhatEver ...