Menu

Pass through a control

Fenistil
2013-10-14
2013-10-15
  • Fenistil

    Fenistil - 2013-10-14

    Hi!

    I would like to create a control (now an ImageView) that pass through the user interactions to the underlying controls. Here is an XCode example how to implement it, but I don't know how to make it in Delphi (or it can be made).

    Thanks

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-10-15

    Hi, Fenistil

    If you have a transparent imageView and you want to pass through clicks to behind of this control just set imageView.UserInteraction := false

    regards

     
  • Fenistil

    Fenistil - 2013-10-15

    Hi!

    Thanks for the fast reply, but I think I tried it. Now I'm not at home, so I can't test it, but yesterday I set UserInteraction to false, but I can't tap through it. I only tested it in simulator. The ImageView has a PNG which is empty in the middle (it's a 20 px width border with a shadow), and there are several controls under it. Should I set anything else from the default values?

    Thanks

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2013-10-15

    Hi Fenistil
    All your controls under this ImageView should not be its child, must be have a other parent,
    When we set false to ImageView, all taps on imageview and childrens controls disabled and passed to under controls of imageview.

    regards

     
  • Fenistil

    Fenistil - 2013-10-15

    Yes I know. The underlying controls have a different Parent. I'll test it today, and will report. Thx

     
  • Fenistil

    Fenistil - 2013-10-15

    You were right, it's working. I've forgot to set this property to false, because I have 2 ImageView and I didn't set it on the second one. Sorry for bothering you with it.

    Thanks a lot!

    Have a nice day! :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.