09-04-2024, 07:35 PM
Button1=Controls.AddButton("My Button1",0,0)
Button2 = Controls.AddButton("My Button2",0,30)
Controls.ButtonClicked=OnButtonClicked
Sub OnButtonClicked
If Controls.LastClickedButton = "Button1" then
GraphicsWindow.BackgroundColor="Blue"
Elseif Controls.LastClickedButton = "Button2" then
GraphicsWindow.BackgroundColor= "Green"
EndIf
endsub
JR
Button2 = Controls.AddButton("My Button2",0,30)
Controls.ButtonClicked=OnButtonClicked
Sub OnButtonClicked
If Controls.LastClickedButton = "Button1" then
GraphicsWindow.BackgroundColor="Blue"
Elseif Controls.LastClickedButton = "Button2" then
GraphicsWindow.BackgroundColor= "Green"
EndIf
endsub
JR