P
P
Persotr272019-03-21 20:39:58
.NET
Persotr27, 2019-03-21 20:39:58

Is it possible to combine some WindowsForms elements into a group, and hide / display everything on some event?

Hello. Is it possible to combine some WindowsForms elements into a group, and hide / display everything on some event?
For example, on the button to hide the elements of a block. On the web, there are classes for this and the hidden property. How about here?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
tex0, 2019-03-21
@tex0

You can put elements on the panel and when you need to hide them - hide the entire panel Panel.Visible = false

S
Satangelus, 2019-03-22
@Satangelus

enjoy https: //github.com/alexander-makarov/ExpandCollaps
...

K
kwayne, 2019-03-24
@kwayne

You can assign a special tag to controls.
Then iterate over all controls in a loop, and set the necessary visibility property for controls whose tag matches the desired tag.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question