gambas-source-code/app/examples/Basic/Object/.src/FStart.class

45 lines
673 B
Text
Raw Normal View History

' Gambas class file
Public myThing As CThing
Public Sub btnCreateThing_Click()
myThing = New CThing
With mything
2019-05-20 08:26:41 +02:00
.Name = ("Dummy-Thing")
.X = 11
.Y = 22
.ID = 33
End With
txtCheckResult.Visible = True
End
Public Sub btnCheckThing_Click()
If myThing Then
With mything
txtCheckResult.Text = Subst("&1, X= &2, Y= &3, ID= &4", .Name, .X, .Y, .ID)
End With
Else
Message.Warning(("You need to create the Thing first!"))
Endif
End
Public Sub btnDestroy_Click()
If Not mything Then
Message.Warning(("You need to create the Thing first!"))
Return
Endif
myThing = Null
txtCheckResult.Visible = False
End