Mick
Mon Jul 19 18:25:39 CDT 2004
Roll your own Panel and use that instead.
Create a new usercontrol.
Change the control to Inherit form Panel instead of User Control.
Add the Following Code:
\\\
Private WithEvents MyParent As Control
Protected Overrides Sub OnParentChanged(ByVal e As System.EventArgs)
MyParent = Me.Parent
End Sub
Private Sub MyParent_Resize(ByVal sender As Object, _
ByVal e As EventArgs) Handles MyParent.Resize
Me.Height = MyParent.ClientSize.Height \ 2
End Sub
///
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Andrew Sharpe" <AndrewSharpe@discussions.microsoft.com> wrote in message
news:4F90F2D4-D1B3-4327-9A4E-A8B91813A073@microsoft.com...
> Is there a way to do it other than within the resize code? I need this
functionality in many, many places. Surely there is a large need for this?
>
> VB.NET's docking and anchoring functionalities have spoiled me on control
resizing, I don't want to code any of it myself if I don't have to!
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 13/07/2004