c# - changing panel colors -


I have just created a simple code to run C #, it has 3 buttons and 1 panel. If you have 2 & amp; Is it possible to change the color also change the third button panel height? For example: If I click on the second button, I would like to place it in yellow and at the same time the height also varies. And with the 3 buttons as well Thanks: -)

  Public Partial Category Form 1: Form {Public Ent Height Panels; Public Form 1 () {Initialization (); Altpany = panel 1 height; } Private Zero Button 1_Click (Object Sender, EventArgs e) {panel1.Height = heightPanel; } Private Zero Button 2_Click (Object Sender, EventArgs E) {panel1.Height = this.Highight / 2; } Private Zero Button 3_Click (Object Sender, EventArgs E) {panel1.Height = this.Height - 150; }}  

I have an idea, but I do not know where to put it, I think that something like this: Panel 1 Hi = it. Back collar. Toasting (); Any input?

Thanks

Hi thanks for the answer Yes, if I click on any button I would like to maintain 3 colors I'm not sure this is possible. For the East: My Button 1 = Pink Button 2 = Yellow Button 3 = Green If I click on the button I will see the pink color and if I click on the button I will see pink and yellow color.

Is this possible?

Thank you again

All you have to do is place a new line on BackAllore is set for example ...

  Private Zero Button 2_Click (Object Sender, EventArgs e) {panel1.Height = this.Highight / 2; Panel 1 Back color = color take this; } Private Zero Button 3_Click (Object Sender, EventArgs E) {panel1.Height = this.Height - 150; Panel 1 Back color = color take this; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -