Reputation: 9
I've tried to create a button in 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 to do it with the background?
Upvotes: 0
Views: 157
Reputation: 26
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
Upvotes: 1