Page 1 of 1
Unexpected skipping in DCBROWSE
Posted: Mon Jun 01, 2015 12:50 pm
by Piotr D
Hi,
three of my customer have reporting an unexpected situation:
when a DBF/NTX file was displayed with DCBROWSE and an pushbutton with for example edit function was pressed,
this function was realized not on (displayed) record, but he was see as a browse pointer is skipped 2 or 4 records
and function worked on this new position. Have you observe situation like these?
Piotr
Re: Unexpected skipping in DCBROWSE
Posted: Tue Jun 02, 2015 4:24 am
by rdonnay
I would need to see your code.
There must either be a flaw in the code or a possibly bad index.
Re: Unexpected skipping in DCBROWSE
Posted: Tue Jun 02, 2015 7:12 am
by Piotr D
Roger,
I will send you later sample code. But for me this behavior looks like it was skipping after mouse wheel (and the wheel was not used).
I have more than 500 installation of this program, and only 3 customer reported for me this.
Piotr
Re: Unexpected skipping in DCBROWSE
Posted: Tue Jun 02, 2015 7:56 am
by Cliff Wiernik
We had something 5-6 years ago where the scroll on the mouse caused the line to jump 3 lines each time instead of 1 line. I don't know what specifically we did to address it.
Re: Unexpected skipping in DCBROWSE
Posted: Tue Jun 02, 2015 4:18 pm
by Auge_Ohr
Cliff Wiernik wrote:We had something 5-6 years ago where the scroll on the mouse caused the line to jump 3 lines each time instead of 1 line. I don't know what specifically we did to address it.
3 lines are default for Windows OS()
you can Set/Get Mouse scroll lines with this Code
Code: Select all
#include "DLL.ch"
#define SPI_GETWHEELSCROLLLINES 104
#define SPI_SETWHEELSCROLLLINES 105
DLLFUNCTION SystemParametersInfoA( nAction, nParam1, @Param2, nWinIni ) USING STDCALL FROM USER32.DLL
PROCEDURE main
LOCAL nScrollLines := 0
SystemParametersInfoA(SPI_GETWHEELSCROLLLINES, 0, @nScrollLines, 0)
? nScrollLines
WAIT
RETURN
Re: Unexpected skipping in DCBROWSE
Posted: Tue Jun 02, 2015 6:34 pm
by Cliff Wiernik
Found my code:
Code: Select all
IF version(3) > '349'
DC_ReadGuiHandler({|a,b,c,d,e,f| LB_DefaultHandler(a,b,c,d,e,f)})
ENDIF
and
Code: Select all
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
*+
*+ 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