470,590 Members | 2,515 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,590 developers. It's quick & easy.

Problem with Layout event speed... or maybe something else

I have a user control which has a custom label. when the labels width
changes, it adjusts it's height to fit it all. Then when I adjust the width
of the user control if the height of the label changes, i also have to
change the height of the user control

So, on that note on the Layout event of the user control I do this...

private void UserControl_Layout(object sender, LayoutEventArgs e)
{
this.Height = labelDescription.Bottom + panelText.Padding.Bottom
+ this.Padding.Bottom;
}

This works great, it does exactly what I want it to do... except!

When the userControls width is adjusted to quickly, the label goes down to
where it needs to go, but the userControl only follows a little bit. So the
text from the bottom of the label will be cut off.

What's going on here?
Apr 10 '07 #1
0 1002

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Charles Blaquière | last post: by
15 posts views Thread by JR | last post: by
4 posts views Thread by Eric Lindsay | last post: by
21 posts views Thread by cmd | last post: by
7 posts views Thread by Kamal | last post: by
2 posts views Thread by skanemupp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.