Passing properties/methods to Class?

Jamie

Member
Licensed User
Longtime User
I have a Bubble class I created that I want to be able to send properties like bbl.Text = "Test" to. I can get the job done with bbl.Text("Text Test") but that just isn't how it should work.
Hope the little bit of code I included helps explain
This is the Main Activity calling the class
B4X:
Sub ListView3_ItemClick (Position As Int, Value As Object)
   bbl.Text("Text Test")  <This works 
   'bbl.Text = "Text Test"  <This what I want to do
   'bbl.Visible = True  <Want to do this way too
End Sub
This is the Class code
B4X:
Public Sub Text(atext As String) As String  << This works but not the way I want
    lblBBL.Text = atext
   lblBBL.TextColor = Colors.Yellow
   lblBBL.Width = lblBBL.TextSize * atext.Length
   lblBBL.Height = 30      
End Sub
Public Sub Visible As Boolean  << This is what I was hoping would work, but doesn't
    If Visible = True Then
     pnlBBL.Visible = True
   Else 
     pnlBBL.Visible = False
   End If
End Sub
Thanks for reading. Look forward to any help you can give.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…