How to come back to background color default for button with blocks?

171 views
Skip to first unread message

Guillaume Combot

unread,
Mar 31, 2015, 5:49:23 AM3/31/15
to mitappinv...@googlegroups.com

I know I could use an image per button (5 images: one default, and 4 of each color, but I would prefer to stick with the blocks)

Ugur Turan

unread,
Mar 31, 2015, 9:03:54 AM3/31/15
to mitappinv...@googlegroups.com
as a workaround, you can place a non-visible button with no text, and set the bg.color of the desired button to bg.color of this non visible button in the blocks.

Ghica

unread,
Mar 31, 2015, 9:18:39 AM3/31/15
to mitappinv...@googlegroups.com
Maybe setting the background color to "none" would work. Otherwise, initialize a global variable at Screen1.Initialize to the background color and reset it to the value you saved in this variable when needed.
Cheers, Ghica.

Taifun

unread,
Mar 31, 2015, 10:09:52 AM3/31/15
to mitappinv...@googlegroups.com
before setting the buttoncolor to another color, just check the previous color to find out the default, as you can see from the screenshot, it is 0

which means, if you set the color later to 0 again, you get the default again...
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Reply all
Reply to author
Forward
0 new messages