Announcement

Collapse
No announcement yet.

Can I disable a button using magic object?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can I disable a button using magic object?

    I was trying to disable a button inside a magic object using this command:

    WriteObject(tUserButton, 0, 0xFF); //also tried -1 but didn't work either

    this is similar to what I would do from my host with a write object command. I wanted to replicate this using the magic object. This doesn't seem to work, I just get the red X on the black background.
    I can control the button, turn it on (WriteObject(tUserButton, 0, 1)) and off WriteObject(tUserButton, 0, 0) but I'm unable to make it disappear.

    Am I doing something wrong, is there another way to do it?

    Thanks,

    Carlo

  • #2
    in the last tap of your workshop project make sure you have the button on the toolbar selected to allow disabling of buttons etc, also it should be uint16_t to disable the widget, so 0xFF (255) will not work, you need 0xFFFF (65535)

    Tony

    Comment


    • #3
      Thanks! That was it I had to send 0xFFFF

      Comment

      Working...
      X