"Swipe" Effect for TPageControl (and other similar controls maybe) lazarus / 31-LCL ---------------------------------------------------------------------- ArminLinder · 2023-04-17 14:34 Hi all, I recently tested one of my pieces of software on a (Windows) PC having a touchscreen. It worked to my satisfaction without changing anyting. Great. The GUI is mainly built around several forms and a TPageControl to switch between them. I wondered, whether it was possible to get the "swipe" effect like on a mobile phone, so I could navigate from one page to the next or previous one with a swipe of my finger. I thought there could be a way by activating Drag_n_Drop and having a 1 px wide "drop" area on each edge of the screen, which catches the swipe once it is touched. Didn't work, however. Has anyone ever tried such a thing wthin the LCL (so there is a chance the software works on Linux as well), and who can help me with some piece of code? Thnx, Armin. ---------------------------------------------------------------------- AlexTP · 2023-04-17 17:25 If you want to add 'swipe' or any other effect to LCL components - don't do it. I tried to add some animations to my ATTabs - bad result. too slow repainting so animation becomes too jumpy and ugly. Sublime Text has such tabs animations. but it uses not LCL - it uses OpenGL or stuff like that. ---------------------------------------------------------------------- Soner · 2023-04-17 17:38 Maybe this is good starting point: http://www.tecepe.com.br/d7gestures/ Google for "win32 gesture" ---------------------------------------------------------------------- ArminLinder · 2023-04-21 06:47 Hi SOner, thanks for your reply, and it was indeed helpful to read about the Multi-Touch support built into Windows, but I need something slightly different, and the solution presented there seems to be Windows only. Maybe I was not clear enough, I am not after the full "swipe" effect (the contents of the page travels along my finger) but merely after a way to touch and move my finger sideways, whereafter an inc(TPageControl.ActivePage) (finger moved right) or dec(TPageControl.ActivePage) (finger moved left) should be performed. Right now I inserted an arrow button in every form at the left and right edge, which works, but I noticed users, especially the youger ones which are more smartphone-affine, trying to switch the page by swiping over the touchscreen. Armin