开发者

"Expander" in Windows Forms

I have the following situation.

"Expander" in Windows Forms

Need:

  • A - always visible;
  • B - "hiddable";
  • Form1 - resizable; 开发者_如何学Python
  • The most right visible panel Docked.
  • In the case in the picture, B should collapse, minimizing the form to the "A" size...

Apparently it is simple, but I tried some hours and posted this topic.


I used as base a Form + SplitContainer with a docked-to-right button in the Panel1. There is a need to remember the actual Form size and to reestablish it when the button expands, or to reduce the form size to the Panel1 size when the form "collapses".


You can use TableLayoutPanel with AutoSize for B column. When user click Expand you show show content of B and Resize Form Width via code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜