开发者

Changing a formwindows backcolor from a panel

开发者 https://www.devze.com 2022-12-23 23:50 出处:网络
I have a panel that is docked to the right side of a windows开发者_StackOverflow form. I set a color with a setting on the panel but I want to then update the main form (not the panel) backcolor to th

I have a panel that is docked to the right side of a windows开发者_StackOverflow form. I set a color with a setting on the panel but I want to then update the main form (not the panel) backcolor to the new setting. But when I use me.backcolor = setting it changes the panels backcolor.

This is also with VB.net windows forms with Visual Studios 2008

Thanks


You have to change the parent's BackColor using:

me.Parent.Backcolor = color;
0

精彩评论

暂无评论...
验证码 换一张
取 消