I know this has occurred before but don't know if its recurrence is due to Xbase2.0. With a DCBROWSE, if you use the up/down arrow, it moves one row. But with the mouse wheel, it moves 3 lines at a time.
How can this be corrected?
Xbase 2.0/Express 264/265 Browse roller button moves 3 lines
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l
I currently have this code:
in my main application program prior to the initial DCREAD GUI
IF version(3) > '349'
DC_ReadGuiHandler({|a,b,c,d,e,f| LB_DefaultHandler(a,b,c,d,e,f)})
ENDIF
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
*+ Function LB_defaultHandler(nEvent, mp1, mp2, oXbp, oDlg)
*+
*+ Default Handler to change the browse scrolling from the wheel to 1 row instead of 3 rows at a time
*+
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
FUNCTION LB_DefaultHandler(nEvent, mp1, mp2, oXbp, oDlg)
IF nEvent == xbeM_Wheel .AND. oXbp:IsDerivedFrom('XbpBrowse')
mp2[2] := mp2[2]/3
oXbp:handleEvent(nEvent, mp1, mp2)
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
To the best of my knowledge, this used to work but does not appear to work now.
Cliff
in my main application program prior to the initial DCREAD GUI
IF version(3) > '349'
DC_ReadGuiHandler({|a,b,c,d,e,f| LB_DefaultHandler(a,b,c,d,e,f)})
ENDIF
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
*+ Function LB_defaultHandler(nEvent, mp1, mp2, oXbp, oDlg)
*+
*+ Default Handler to change the browse scrolling from the wheel to 1 row instead of 3 rows at a time
*+
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
FUNCTION LB_DefaultHandler(nEvent, mp1, mp2, oXbp, oDlg)
IF nEvent == xbeM_Wheel .AND. oXbp:IsDerivedFrom('XbpBrowse')
mp2[2] := mp2[2]/3
oXbp:handleEvent(nEvent, mp1, mp2)
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
To the best of my knowledge, this used to work but does not appear to work now.
Cliff
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l
It appears the object send is not the browse object any more but the XbpCellGroup object.
Replacing XbpBrowse with XbpCellGroup fixed the problem.
Replacing XbpBrowse with XbpCellGroup fixed the problem.
Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l
You can override the event in the handler:
I found this code in the old XBP_BRW.PRG source code from Alaska. They divided by 120. I changed it to 360.
This is working for me:
I found this code in the old XBP_BRW.PRG source code from Alaska. They divided by 120. I changed it to 360.
This is working for me:
Code: Select all
#define SPI_GETWHEELSCROLLLINES 104
STATIC FUNCTION MyHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList )
LOCAL i := 0, j
IF nEvent == xbeM_Wheel .AND. oXbp:isDerivedFrom('XbpColumn')
SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, @i, 0 )
IF i < 0
i := oXbp:RowCount
ENDIF
i := Int( (Mp2[2] / 360) * i )
i *= (-1)
DC_ClearEvents()
PostAppEvent( xbeBRW_Navigate, XBPBRW_Navigate_Skip, i, oXbp:parent )
RETURN DCGUI_IGNORE
ENDIF
RETURN DCGUI_NONE
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l
This also appears to be a mouse properties setting. Under wheel, Vertical Scrolling, Roll the wheel one notch to scroll; the following number of lines at a time. 3 appears to be the default.
Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l
this is what Constante SPI_GETWHEELSCROLLLINES will read from RegistryCliff Wiernik wrote:3 appears to be the default.
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
you can goto System -> Mouse and change it if you like.SystemParametersInfo function
SPI_GETWHEELSCROLLLINES
0x0068
Retrieves the number of lines to scroll when the vertical mouse wheel is moved.
The pvParam parameter must point to a UINT variable that receives the number of lines.
The default value is 3.
greetings by OHR
Jimmy
Jimmy