🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core2 checkbox set_checked doesn't work

    General
    3
    4
    5.7k
    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.
    • M
      mwenghi
      last edited by

      Hello everyone,

      I'am using UiFlow Beta V1.7.1 with Core2 (v1.7.1-core2 firmware). The block Set checkbox checked seems doesn't really work after running on the device, checkbox remain unchecked.

      0_1609988337865_Screen Shot 2021-01-07 at 3.50.41 AM.png

      When I use set_checked for toggling two checkboxes, it seems to work only sometimes.

      0_1609990536942_Screen Shot 2021-01-07 at 4.23.21 AM.png

      V 1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @mwenghi

        I can confirm that set_checked doesn't work with UIFlow 1.7.1.1 firmware. I can change the text of a checkbox with set_text, but changing the state of the checkbox doesn't work.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • V
          veryalien @mwenghi
          last edited by

          @mwenghi I've worked out that set_checked does actually work. It changes the internal state of the checkbox from unchecked to checked, but it's not changing the visible state of the checkbox on the screen, so it doesn't appear to do anything!

          If you add a set_checked_color call (in blockly it's the block set selectedColor) after your set_checked it will then show the relevant checkbox as checked in your desired color.

          1 Reply Last reply Reply Quote 1
          • felmueF
            felmue
            last edited by

            Hello @veryalien

            nice work-a-round. Hopefully it will be fixed soon though.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • First post
              Last post