Active 5 years, 11 months ago. Viewed times. I am trying collapsible panel. Object sender, System. Parent; foreach Panel p in TableLayoutPanel1.
Controls 0 ; if p. Controls; what did i as wrong? Patrick Hofman k 19 19 gold badges silver badges bronze badges. What is the exception? For First Line gets or sets the parent container of the control — malathi. ControlCollection' to 'System. Panel' — malathi. Are you sure all controls in TableLayoutPanel1 are Panels? Are you sure all controls in each panel are Labels? Add a comment. Active Oldest Votes. Yes i have done this before Ggalla Ggalla 7 7 silver badges 18 18 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Using the control at design time is very simple. Basically it behaves the same way as a normal Panel except that it can be expanded and collapsed. After adding the Control to the toolbox, drag it on the design surface of your form and you'll get:. The control shows a smart tag when clicked it opens a window showing panel's new features and properties that we can use to customize the panel.
The most important part of the code lays in the OnPaint method where custom control rendering takes place. This method was overridden so that custom painting takes place. Expanding or collapsing the panel is very simple when not using animation.
0コメント