Page 1 of 1

How can you activate the xbeM_Wheel in a DCDIALOG

Posted: Fri Mar 07, 2025 10:45 am
by digitsoft
Hi Roger
How can you activate the xbeM_Wheel in a DCDIALOG

Re: How can you activate the xbeM_Wheel in a DCDIALOG

Posted: Sat Mar 08, 2025 1:50 am
by Tom
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 
...

Re: How can you activate the xbeM_Wheel in a DCDIALOG

Posted: Sat Mar 08, 2025 11:42 pm
by Wolfgang Ciriack
if you are using XBase++ 1.9 you have to disable "scrolling of inactive windows, if the cursor is over it" in the windows mouse scrolling settings.

Re: How can you activate the xbeM_Wheel in a DCDIALOG

Posted: Thu Mar 20, 2025 11:09 am
by digitsoft
Hello Tom
The cursor moves with the wheel, but I want to know how to position myself at the top of the screen if I use the test to see more data that is hidden below.

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 
...