EHorodyski
EHorodyski

Reputation: 794

Resize parent control from child's resize event

I'm starting work updating an UI for one of my company's applications and I'm running into a sticky issue. The parent control contains several panels, each of which can be turned on or off depending on user input.

The final panel in the user control contains another user control which gets resizes according to a toggle switch. Essentially, it "opens" up more information.

While the child control (ChildControl) is docked to Fill inside the parent control (ParentControl), when I add height to ChildControl I can't get ParentControl's height to get updated as well. Currently I'm handling the ChildControl.Layout event in ParentControl but I can't seem to reach that code. To resize ChildControl, I'm calling Me.Height += 200 in ChildControl.vb.

I believe I'm doing this wrong, but MSDN isn't being much help. Thanks for any and all help.

Upvotes: 0

Views: 2375

Answers (1)

ispiro
ispiro

Reputation: 27713

Try the ChildControl.Resize event.

My answer is in C#. But it might work the same.

Upvotes: 1

Related Questions