How to get the button control of a Panel

gkumar

Active Member
Licensed User
Longtime User
I have a panel with around 15 buttons assigned to it as parent. How can I get the button control to access its properties like visible etc.
Through the direct member of button I can do that. But I want like using iterator. I tired like

For nPanelViewCount = SchematicPanel.NumberOfViews -1 To 0 Step -1
SchematicPanel.GetView(nPanelViewCount).Visible = False
Next

But Button controls are not returns as Views of panel.

How Can I achieve this?

Thanks,
 

gkumar

Active Member
Licensed User
Longtime User
I have one image view also in that panel. I am able to retrieve that. But buttons are missing from panel view count list. Buttons are added in the designer window with bitmap background. Any idea what I am missing here?

Thanks,
 
Upvote 0

gkumar

Active Member
Licensed User
Longtime User
Erel,

Now its working. The reason for not to work is after adding the panel and its child button views, again I was initialising panel and adding it to the activity and Initialising it via the Initialize() method in the Activity_Create() method.

Just wanted to know how it prevents the panel from retrieving its button views?
 
Upvote 0

omar madraba

New Member
hello,
I just have maybe the same problem,
I would like to get 3 panels in my application,
and those had views inside like buttons.

my question is where should I put or write the code that I want to affect to those button for example.

:sign0085:

Omar Madraba
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Where and how do you define your panels ?
In the Designer you can use Generate Members

... where should I put or write the code that I want to affect to those button for example.
In the module where you have the panels.

I'd suggest you to read the Beginner's Guide .

Best regards.
 
Upvote 0
Top