Hide button that was created with addview

Shay

Well-Known Member
Licensed User
Longtime User
Hi

I used this to create buttons, how do I hide it
I am trying BtnPlayer. - when I press the "." I am not getting the menu with the visible commands and more

For i = 1 To 50
Dim BtnPlayer As Button
BtnPlayer.Initialize("BtnPlayer")
Activity.AddView(BtnPlayer, 5dip, 5dip + 36dip * i, 85dip, 33dip)
Next

to clarify - the "." is working on this funtion place, when I go to different place in the code, it is not recognizing it anymore
 
Last edited:
To access any view everywhere, you need to declare it in Globals. In this you can declare it as an array of buttons in the Global. That is - Dim BtnPlayer(50) As Button. Then, inside the For loop, use BtnPlayer(i) instead of BtnPlayer.

And finally to hide a view, set it's .Visible property as False.
 
Last edited:
Upvote 0
Back
Top