omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    [Tip] adding a ui.Button to a ui.Label as a subview

    Pythonista
    touchenabled ui.button ui.label
    1
    1
    1467
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phuket2
      Phuket2 last edited by

      This is a simple error to make I think. I added a btn to a label as a subview. For the life of me, I could not get the button to call it's action func. After way too long I thought about the touch_enabled attr. Sure enough, that's all it was. It makes sense that for a label that by default, touch_enabled == False.
      I am surprised I haven't hit this problem before. Possibly there was a change between 1.5 and 1.6. I did a lot with ui in 1.5, esp combining views. I feel I would have remembered this issue.
      Anyway, something to keep in mind, I am sure you have to think like this when combining other variations of ui Elements

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Powered by NodeBB Forums | Contributors