I’ve tried all of the following code and nothing works… what am I doing wrong?
There are 2 buttons (Bootstrap) on screen…
AppStudio v 6.2.3.1…
Function Button1_onclick()
'Dim VarRed
’Dim VarGreen
’Dim VarBlue
’VarRed = FuRandom(0,256)
'VarGreen = FuRandom(0,256)
'VarBlue = FuRandom(0,256)
'Button1.backgroundColor = RGB(VarRed,VarGreen,VarBlue) 'doesn’t work
Button1.backgroundColor = “Red” 'doesn’t work
End Function
Function FuRandom(VarLowRange,VarHighRange)
Dim x,VarLowRange,VarHighRange
If VarLowRange > VarHighRange Then
MsgBox(“Low range must be less than or equal to high range”,0,"")
Else
x = Rnd
FuRandom = Int((x * (VarHighRange + 1 - VarLowRange)) + VarLowRange)
End If
End Function
Function Button2_onclick()
'Button1.backgroundColor = “Red” 'and this doesn’t work
Button1.background = “Red” 'and this doesn’t work
End Function