Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 C# C#4.0
hi i have a form that it has a lable.the autosize property of this lable set to true .the text of this lable may grow on limited and some line of this text will not display in form area how can i grow this form when lable gorws automaticlly
Posted 5-Jan-13 22:40pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

There is no automatic way to do that - anchoring doesn't work with autosize labels.
 
You will have to handle the Label SizeChanged event and update the Form Width and Height appropriately.
 
Personally, I would probably use a ReadOnly Text box instead, and enable scrolling - a form which changes height is going to look odd to the user.
  Permalink  
Comments
behrad110 at 6-Jan-13 4:09am
   
hi thanks for replay but i wanna grow form if number lines were more than size of text box or lable
OriginalGriff at 6-Jan-13 4:24am
   
I think it will look odd, but go ahead - handle the event, and do it.
sariqkhan at 6-Jan-13 5:07am
   
og sir can you help me here
http://www.codeproject.com/Questions/522502/passingplustheplusdataplusfromplustextboxplustoplu

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 6 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100