K
K
KamAKAM2020-05-23 17:25:58
C++ / C#
KamAKAM, 2020-05-23 17:25:58

What should I do so that when I press the ONE button, the container opens and when I press the TWO button, the previous container closes and a new one opens?

I have buttons, when I click on the button, a container appears (by default it has Visible = false), that is, it does not appear, or rather, it is displayed (see the code to make it clear). So that's what I need to write in the code so that when I click on one button, this container is displayed, and when I click on the second button, the previous container is closed (so that Visible becomes = false again) and another container is displayed, which belongs to the second button. I hope I explained the situation clearly.
5ec9325093ffd700989361.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BasiC2k, 2020-05-24
@BasiC2k

Make a separate procedure that will control the visibility of the elements. The procedure has one parameter - the display option.
From the button press procedures, make a call to this procedure with the desired parameter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question