Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
...
repeat with i = 1 to the num of btns of grp "group1"
set the backgroundcolor of btn i of grp "group1" to 1,2,3
end repeat
...
OTOH, if you set the group to non-opaque and the backgroundcolor of the buttons to empty, then you can set the backgroundcolor of the group and the buttons will inherit this property.
My problem with setting the backgroundcolor of the group is the buttons are all empty except the one clicked. using the group color doesn't change the color of the last button pushed back to empty.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
button"A4": execution error at line 5 (Chunk: can't find background), char 25
What did I do wrong? Is it because I created all the buttons before I grouped them?
global selLOC
on mouseUp
lock screen
repeat with i = 1 to the num of btns of grp "LOC Group"
set the backgroundcolor of btn i of grp "LOC Group" to empty
set the textcolor of btn i of grp "LOC Group" to empty
end repeat
set the backgroundcolor of me to blue
set the textcolor of me to white
put the label of me into selLOC
unlock screen
end mouseUp
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Hm, very strange, just made a test with three grouped buttons and with that above script attached to the first button in the group and it executed without any error!?