Page 1 of 1

DcBrowse SelectItem on a touchscreen

Posted: Tue Jun 28, 2022 6:28 am
by PedroAlex
Hi Roger!

I have a strange behavior in DCBrowse Select Item. using a touchscreen in windows 10
With the mouse it works fine, but selected with the finger doesn't work properly.

https://youtube.com/shorts/_sISrh6iFtc?feature=share

https://youtube.com/shorts/w59flPYeUC0

Have there been any reports of this type of problem?
do you have any idea what could be wrong?
Can you take a look? Maybe you have a suggestion!

Re: DcBrowse SelectItem on a touchscreen

Posted: Tue Jun 28, 2022 6:43 am
by rdonnay
What version of Xbase++ are you using?

My touch screen monitor (Windows 10) selects rows and also toggles the checkbox just fine with your CheckBrow sample.

Re: DcBrowse SelectItem on a touchscreen

Posted: Tue Jun 28, 2022 7:39 am
by PedroAlex
Hi Roger!

Alaska XppLoad Version 2.00.1176


This happens on POS terminals with a capacitive touchscreen.
I've tested it on several different ones and with the same behavior.
I also tested it in POS with resistive touchscreen and it works well.
On Windows 7 it also works fine.

This problem occurs with capacitive touchscreens in windows 10!

Resistive screens are older and respond to a single touch.
Capacitive screens are newer and have multi-touch capability.
On capacitive screens, the touch reception system is electrically charged and this can generate a different signal that may not be fully compatible with lbClick!!??

Is there another way to do this:

Code: Select all

DCBROWSECOL ELEMENT 4 HEADER "Qtd." Picture '@e 99 999.99'  PARENT oBrowTA WIDTH 110 HCOLOR GRA_CLR_WHITE, COLOR_BLACKGRAY EVAL {|oB1|oB1:dataArea:lbClick := {||IIF(oBrowTA:colPos=1, (aTA[oBrowTA:Cargo[4],9]:=!aTA[oBrowTA:Cargo[4],9], oBrowTA:refreshCurrent(), Dc_GetRefresh(GetList)  ),)}}
Note : DobleClick worksfine in all situations!

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 12:52 am
by skiman
Hi,

I was looking at your sample, I wondered why you test on the colpos?

Code: Select all

... EVAL {|oB1|oB1:dataArea:lbClick := {||IIF(oBrowTA:colPos=1, (aTA[oBrowTA:Cargo[4],9]:=!aTA[oBrowTA:Cargo[4],9], oBrowTA:refreshCurrent(), Dc_GetRefresh(GetList)  ),)}}
This should work:

Code: Select all

... EVAL {|oB1|oB1:dataArea:lbClick := {||aTA[oBrowTA:Cargo[4],9]:=!aTA[oBrowTA:Cargo[4],9], oBrowTA:refreshCurrent()}}
dc_getrefresh() is not always needed. Remember that this can cause flickering and takes some time.

Otherwise, I never used the 'oB1:dataArea:lbClick' which looks as a good idea to me. Thanks for the sample.

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 1:40 am
by Tom
LbClick (and others, like LbDblClick, LbDown and the same for right clicks) are callbacks available with any part that is based on a XbpStatic, and the parts (heading, dataarea, footer) of a column are statics. You may also use this slot on text statics and elsewhere, like this:

Code: Select all

@ 1,1 DCSAY 'Hello' EVAL {|o|o:LbClick := {||MsgBox('You clicked on Hello')}}
LbClick should act as ITEMMARKED in a browse, and LbDblClick like ITEMSELECTED.

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 2:59 am
by PedroAlex
Chris and Tom.
do you have conditions to test the example I posted on a touch screen in windows 10?

Many Thanks.

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 3:05 am
by Tom
@Pedro: On friday.

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 4:29 am
by skiman
Hi Pedro,

I tested it on Windows 11, and it isn't working.

When I touch the screen, the cell is selected, but the lbclick isn't fired.

I also tried with lbdown and lbup, but that's also doesn't work.

I was wondering if the itemmarked event could solve this, since the cell is highlighted after the touch-click and the itemmarked event is fired.

Re: DcBrowse SelectItem on a touchscreen

Posted: Wed Jun 29, 2022 11:49 am
by PedroAlex
Hi Chris!

So far I only register this problem on machines with windows 10 release 21H1 and 21H2 (I have only had these versions available).
At first I was suspicious of the type of touchscreen (resistive or capacitive). But I've given up on this theory and I think this is related to something in windows 10 21H1 and beyond. Probably something in xbase is no longer suitable for these versions.

Re: DcBrowse SelectItem on a touchscreen

Posted: Fri Jul 08, 2022 7:17 am
by PedroAlex
Found a solution for this problem!

ITEMMARKED is the solution!

dataArea:lbClick does not upgrade de mouse position cursor and causes the problem I reported!

Attached the sample working correctly.
Teste_2033.rar
(286.77 KiB) Downloaded 233 times