I've tried to create a button with the programming languege xojo, so every time I press it the background color should randomly change. The name of my window is just Window1. I can't figure out how to do it, I would appreciate an example please, I know how to generate random colors, but how do it do it with the background ?
Asked
Active
Viewed 117 times
0
-
1Please provide enough code so others can better understand or reproduce the problem. – Community Apr 10 '22 at 15:01
1 Answers
0
If you've already tried to set the background color, please also ensure the HasBackgroundColor
property of your window is set to True
:
Self.HasBackgroundColor = True
Self.BackgroundColor = Color.Red // Use your random color variable instead

Ricardo Cruz
- 16
- 1
- 3