Error in color assignment post longtouch in combination with the "enabled" property in buttons

There is an error in the assignment of colors to buttons after having changed the “enabled” property in combination with a “longclick” on a button. See example.NewListView TinyListView.aia (9.3 KB)

Please post your blocks. It takes a lot of time to download and import your aia.

What is the behavior you are seeing and what do you expect to see?

The color is not the original one - here light grey as default. I’m afraid, but I think you should test it. Pictures say more than a text. It is a problem which I noticed for long.
Thanks Peter

Still not clear to me what i should be looking at. You have multiple buttons on the screen. Point me in the right direction please.

Okay, I have made it easier… So, press a button “longclick”. Then it gets disabled and its color changes to a darker one. Then press the other button. By this the first button will be enabled again but its color is not the right one. It is too dark. I hope I could make it clearer. The first button gets it right color not before having touched itself. I see: In the designer the text of the label must be set to 1 with the “up” button being disabled.

TinyListView_copy.aia (3.2 KB)

Addendum: May be that it is device dependent what I can’t really believe because there is the same behaviour on my Samsung smartphone. I usually use a Sony
xperia Z4 tablet for the development.

1 Like

I see what you mean:

If I change Screen1 Theme from Classic to Device Default this doesn't occur. I don't know what that tells us but I personally always set the Theme to Device Default anyways:

To get back to the button default colour you have to set it to 1 (or 0)

Hello Ken, thank y very much! This really solves the problem. To be honest, until now I didn’t pay attention to those issues.

1 Like

Hello Tim, I tried that without being successful. On the other hand, for me it doesn’t seem to be a logical way to do that. Changing the “enabled” property itself should set the right colour as it happens when I do only a click (not a longclick) at the end of the list when the colour changes automatically according to the enabled status. I think that there is a bug within the system code while setting the adequate colour within the longlick routines. For now I follow Ken’s hint. However, thank you for your reply!

1 Like

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