Finger scrolling a TDBGrid in Delphi - delphi

I'm trying to make a VCL app more touch friendly and have been trying to get a DBGrid to scroll like an Android or iOS grid/list. By default it works if you do a double flick - with inertia and everything, but would like it to scroll with a single flick or finger drag.
I figure it will be something in the touch properties, but I haven't managed to work out the magic combination.
Has anyone done this?

Related

How to make the iOS bottom-sheet panel of Maps in react-native?

I am developing a react-native app. I'm trying to make a UI element similar to the one on Maps in iOS, in which you can slide a panel from the bottom.
The behavior of the list is quite complicated as:
You can't scroll down the list until the panel is fully open.
Trying to scroll it down makes the panel go up, and then if you continue the sliding movement on the screen the list starts scrolling.
And of course:
You can't slide the panel down until the list is at the beginning.
If you try to slide the panel down and the list isn't fully scrolled up, you end up scrolling the list to the beginning and then pulling the panel down.
The list scrolling up or down and the panel moving up or down has to be made in one movement. The user doesn't have to pull his finger out of the screen to make the second action. This is the actual hard part. Furthermore, it has to work on iOS and Android.
An example GIF of the iOS panel and the expected behavior.
The perfect module would be something like this, but the list is still scrollable even when it has reached the top: https://github.com/donaldmorton/react-native-bottom-drawer
I tried with this module without success:
https://github.com/simonhoss/react-native-touch-through-view
Something like that in react-native would be perfect:
How can I mimic the bottom sheet from the Maps app?
I already checked this post:
React Native slide out panel and scrollview
Any kind of help is welcomed, thank you!
You can see https://github.com/osdnk/react-native-reanimated-bottom-sheet.
It built from scratch with react-native-gesture-handler and react-native-reanimated

Using Mouse.SetPosition for FPS mouse look but takes over mouse for all windows app

I have a FPS game and using mouse look. I use Mouse.SetPosition to set the mouse position back to center of the game window at every frame. This works great and the mouse look is working very good. The problem is this takes over mouse position for every windows app. If I alt tab to another app, the mouse constantly tries to goto the center of the game window. This seems like very bad behavior. Any idea how to fix this behavior but still allow my mouse look to still work?
It has to do with User32.dll
I was programing an autoclicker to do my homework (AI) simple
And this website helped me alot...
http://www.codeproject.com/Articles/32556/Auto-Clicker-C

JQuery Mobile list elements overly sensitive to taps

I've noticed that when I have long list elements in JQuery Mobile and I try to scroll them, I accidentally select an element. Overall the act of scrolling tends to get confused with tapping.
I did some comparison to a native iOS list and here is the difference:
In JQueryMobile, as long as you do a MouseDown and MouseUp on an element, it is considered a click. It doesn't matter if you've scrolled inbetween the events.
In iOS, if you do a MouseDown on an element and then scroll at all, the MouseDown is effectively canceled. This allows you to tap on something, scroll the page up and release without it being considered a click.
Has anyone noticed this and/or developed a patch for it? If not, any suggestions on a fix?

How to mimic two-finger scroll/drag gesture on ios simulator?

I have a scroll page that I specified two fingers minimum. It works on my device, but don't know how to mimic this gesture on Simulator. I can mimic one-finger scroll without problem. I've tried option/ctrl/shift etc, but couldn't get it work. Maybe my combination is wrong. Anyone knows how? Thanks.
Holding the "Alt/Option" key and dragging simulates multi-touch pinch-to-zoom.
Holding "Alt/Option + Shift" and dragging simulates multi-touch scrolling.
There is a nice table with all the supported gestures in the iOS Simulator User Guide from Apple. Here is the extract for the two-finger drag:
Place the pointer where you want the two-finger drag to occur.
Hold down the Option key.
Move the circles that represent finger touches to the start position.
Move the center of the pinch target by holding down the Shift key, moving the circles to the desired center position, and releasing the Shift key.
Hold down the Shift key and the mouse button, move the circles in the direction you want to drag, and release both the Shift key and the mouse button.
Hope it helps.
To appear two fingers:
press ALT and drag mouse.
To zoom using two fingers:
press ALT and press SHIFT (to adjust touches.After adjusting release SHIFT key) and drag mouse.
Things moved around in Sierra for me, but here is how I enabled 3-finger scrolling:
**System Preferences > Accessibility
Scroll down to Mouse & Trackpad and tap Trackpad options
Make sure 'Enable Dragging' is selected
Select 'three finger drag' from the drop-down
Makes such a big difference when testing on various devices & simulators.
The best way to scroll in the iPad simulator is by the Three Fingers dragging, which is a global setup of the OS X and not a particular feature of the iOS simulator.
In order to scroll using three fingers you need to turn on the 'Three Finger Drag' under TrackPad > Point and Click in the Settings App of OS X.
and to set the Mission Control and App Exposé to use four fingers (in TrackPad > More Gestures in the Settings App of OS X)
(I made beautiful screenshots, but I'm too rocky to post answers with images)
It works with Three finger scroll on the Track pad.
It works for me on MBP trackpad as well as on Magic Trackpad.
The clue is to enable "Three finger drag" in Trackpad settings (Preferences.app), then dragging, while ALT+SHIFT are pressed, makes scrolling work as expected.
It also works with the "Three finger scroll".

How do I hide (but not disable) scrollbars on iPad while scrolling?

I am working with the iPad (mobile safari):
Question:
Does anyone know how to hide the scrollbars on iPad?
I have looked already looked into webkit scrollbar styling using ::-webkit-scrollbar... This does not work for the main windows scrollbars.
Scenario:
I have an repeating image inside of a div that is over 10,000px by 10,000px. I want the user to be able to swipe the screen to move around over this huge div, which is essentially one big image, WITHOUT the scrollbars showing up.
So I need the functionality of the scrollbars, I just need them to be hidden.
Suggestions?
Thanks for your help!
-slwd
You might be able to use the TouchScroll library: http://uxebu.com/blog/2010/04/27/touchscroll-a-scrolling-layer-for-webkit-mobile/
Otherwise, what I would do is set overflow: hidden on your div and then use JavaScript to implement the scrolling. This will require listening for touchstart, touchmove, and touchend events, and moving the x/y position of your image accordingly. If you need frictional slowing (similar to what's built into scrolling views on mobile Safari) you can implement that as well. Keep track of the dx/dy between touchmove events, use that as a starting velocity for when you receive a touchend, then use setInterval as a timer to apply the friction until some minimum threshold at which you stop the animation.
This is sort of a hack, but: Make your UIWebView about 10px taller and wider than the screen.
(Inspired by someone asking the opposite question.)

Resources