GraphicsWindow.Width=800
GraphicsWindow.Height=600
Controls.ButtonClicked = OnButtonClicked
GraphicsWindow.BackgroundColor="lightgray"
GraphicsWindow.FontSize=40
GraphicsWindow.BrushColor="red"
GraphicsWindow.DrawText(180,100,"Terület, kerület számítás")
GraphicsWindow.FontSize=20
GraphicsWindow.BrushColor="blue"
GraphicsWindow.DrawText(250,200,"a=")
asz=Controls.AddTextBox(300,200)
GraphicsWindow.DrawText(250,250,"b=")
bsz=Controls.AddTextBox(300,250)
GraphicsWindow.DrawText(250,300,"kerület=")
ke=Controls.AddTextBox(350,300)
GraphicsWindow.DrawText(250,350,"terület=")
te=Controls.AddTextBox(350,350)
Controls.AddButton("Számol",350,400)
Sub OnButtonClicked
a=Controls.GetTextBoxText(asz)
b=Controls.GetTextBoxText(bsz)
k=2*(a+b)
t=a*b
Controls.SetTextBoxText(ke,k)
Controls.SetTextBoxText(te,t)
EndSub
|