Skip to main content
manto.1
Associate III
January 26, 2022
Question

How to override virtual functions of a SwipeContainer?

  • January 26, 2022
  • 1 reply
  • 976 views

I know how to ooverride a virtual function of a button callback for example. I would like to override the virtual method handleDragEvent. I have a mainScreen that contains SwipeContainer. How do I override virtual function of a swipeContainer. Where (in what file) shoud i do it and how?

0693W00000JNKwqQAH.png

This topic has been closed for replies.

1 reply

Romain DIELEMAN
ST Employee
February 10, 2022

Hi,

Overwriting the handleDragEvent is a bit risky to be honest. What are you trying to do exactly ? As commented in another one of your post you can modify the library if you wish found in the Middleware/ST/touchgfx folder. Otherwise I would recommend creating your own widget where you base your code on the SwipeContainer so that you can have full controll of it. This does add a layer of complexity in your project however... Custom widgets will also not appear in TouchGFX designer but will on target or on the simulator.

/Romain