Have a Label with variable size

kumaraswamy

Member
Joined
Jul 24, 2009
Messages
12
Programming Experience
1-3
Hi,
I have a label in my Form which on loading, displays the contents of a text file. The contents of the text file may change and if so, the number of lines also will. I would like the Form to automatically resize itself based on the number of lines in the file. If there are more lines that the size of the label can take, I would like it to either resize or show scroll bars - Is this possible; If so how?

Thanks
Kumar
 
I do not think that a Label can display ScrollBars (somebody will now post proving me wrong :) ).

However, both a Multi-Line TextBox and a ListBox can. Is it possible for you to use either of those?
 
Use a TextBox control, set these properties: Multiline, ReadOnly, ScrollBars
 
Back
Top