Button color doesn't change on enable/disable

Hi everyone,
I'm facing a very weird issue.

Even if I set my button to be disabled by default, the color stays the same as if they were enabled.

The two side buttons are the right color, but the 4 centered one are not.
As anyone faced a similar issue ?

Thanks !

1 Like

Hi @PCover Welcome to our community!

Can you provide your blocks?

get an image of your blocks

get an image of your blocks (→ right mouse click in Blocks area)

How to ask a question (open new topic)

1 Like

Hi there it is :


There are others blocks but they don't interact at all with the buttons and it would be confusing to post it all in my opinion...
All the "panels, head, foreuse, mèche" are image sprite that I show when buttons are clicked.

1 Like

I think the problem is that you are using TouchDown and TouchUp so I suggest, you better replace the TouchDown or Up block with Click block, like this :

component_event

And For Image Sprite you can use this one :

component_event

1 Like

Please use this block:
it sets the color to green if the button is enabled, and it sets the color to red if disabled.

2 Likes

Sadly it did not work. I thought this was the problem too.

I'll try a few other things and if nothing works i'll do it like @momoney suggested it.

1 Like

Is That Image Sprite Panneaux, Foreuse, Tete, Meche?

1 Like

Are the four middle buttons in a table arrangement?

Try placing them in two horizontal arrangements inside a vertical arrangement

2 Likes

Oops, I did not explain it clearly.
Those are 4 buttons. When they are clicked, an image sprite appears to give more information on what the user has clicked.
These image sprite are in a canvas above the 4 buttons.

1 Like

It was indeed in a table arrangement.
I tried to change it into 2 horizontal arrangements but it changed nothing.

I even deleted everything relative to those 4 image sprite but not a single change neither.

1 Like

@PCover i think It's better if you do this first, and then show me your all of your blocks.
And maybe we can solve your problem quickly if you provide the aia project too

1 Like

Share your .aia project, or build a sample project showing the same problem, because nothing can be deduced from the images you showed and the color change works in my projects.

1 Like

I found the culprit !

It is because of the rounded shape. When I turn it back to default, the colors are all good !
Guess I'll have to switch back to default or code the color change on click.

2 Likes

Hi @PCover if you feel your problem has been solved, please close this topic by pressing the
Solution button, so other people who have problems like you can be helped with the topic you created.
Thank you :wink: :+1:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.