Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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.
 
Share this answer
 
Comments
behrad110 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 6-Jan-13 4:24am    
I think it will look odd, but go ahead - handle the event, and do it.
sariqkhan 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900