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.


    Implementing UI in High Scores Module

    Pythonista
    2
    3
    1728
    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.
    • techteej
      techteej last edited by

      Hey all. I'm working on implementing the UI module into my high scores module and I'm having some trouble with button images. The image draws underneath the button, and when I gave it the button.image attribute, the image didn't display at all.

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by

        Buttons have an .image variable that can be set to a ui.Image.

        button = ui.Button(background_color='white',
                           frame=(360, 175, 75, 32),
                           image=ui.Image.named('ionicons-arrow-right-a-24'))
        

        And comment out your .draw() method.

        1 Reply Last reply Reply Quote 0
        • techteej
          techteej last edited by

          Lesson learned. Need to use Image.named

          Thanks.

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