I am writing an app that involves a ClientSocket superclass. Inside that superclass, I am sending records out and what I want to do is have a counter on the main screen to show status. I already have a Global counter but I wanted to copy that value to a label on the screen but inside the function of the ClientSocket, I can not see that label
Make sure the label control on the windows has its scope set to public, then reference the label with its full path e.g.
Window1.Label1.Text = Counter.Tostring
Another approach would be to add a property to your ClientSocket: StatusLabel as Label. You’d assign the corresponding label to it (e.g. at connect time, or when the window opens) and use, where you want to show the status: if StatusLabel<>nil then StatusLabel.Text=“Some text”.
Thank you guys,
I used Wayne’s suggestion and it did what i was looking for