The strange thing is that you can set the returned type as Boolean, String, Int, etc. and you don't get errors, the event will be raised anyway and its existence prevents underling views from...
Both the Designer and the "intellisense" create the event as method, not as function (apparently).
P.S.
It seems to me that compiling with the returned value as number, the java code created will be:
return 0;
If you don't declare its type:
return "";
Probably, all Subs are functions, with a hidden string value returned.
Anyway you don't need to write "return xxx" to consume the event.
Thanks, I also tried returning True after declaring Panel1_Touch as function as you did, and it had no effect.
But here's the problem. I have a custom view, similar to Klaus's LimitBar where the user can drag the panel horizontally and the panel changes its size. Works great when the LimitBar is placed on a Panel or Activity.
Except if I have the LimitBar on a HorizontalScrollView things go wonky. If I touch the LimitBar (panel) and start to drag it, it will execute the ltbPanelFront_Touch event as expected. It will be called 5 times with Action=0 (Down), Action=2 (Drag), Action=2 (Drag), Action=2 (Drag), Action=3 (Unknown) and for some reason the X & Y parameters now point to a spot outside the dimensions of LimitBar. The finger is still inside the LimitBar so the X,Y values are incorrect.
When it is called the 5th time with Action=3, the drag operation is now intercepted by the HorizontalScrollView and the HorizontalScrollView starts moving and the LimitBar drag operation is stopped dead. This is wrong because the LimitBar still has the focus and the finger is still inside the LimitBar (but the X,Y parameters are outside the dimension of the LimitBar). The HorizontalScrollView never got the Down touch event, so why is it scrolling?
I included a simple test app to demonstrate the problem.
Is there any way to lock the HorizontalScrollView to prevent it from scrolling?
TIA