Xbase 2.0/Express 264/265 Browse roller button moves 3 lines

This forum is for eXpress++ general support.
Post Reply
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Xbase 2.0/Express 264/265 Browse roller button moves 3 lines

#1 Post by Cliff Wiernik »

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?

Cliff Wiernik
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

#2 Post by Cliff Wiernik »

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

Cliff Wiernik
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

#3 Post by Cliff Wiernik »

It appears the object send is not the browse object any more but the XbpCellGroup object.

Replacing XbpBrowse with XbpCellGroup fixed the problem.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l

#4 Post by rdonnay »

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:

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.

Cliff Wiernik
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

#5 Post by Cliff Wiernik »

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.

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Xbase 2.0/Express 264/265 Browse roller button moves 3 l

#6 Post by Auge_Ohr »

Cliff Wiernik wrote:3 appears to be the default.
this is what Constante SPI_GETWHEELSCROLLLINES will read from Registry

https://msdn.microsoft.com/en-us/librar ... s.85).aspx
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.
you can goto System -> Mouse and change it if you like.
greetings by OHR
Jimmy

Post Reply