Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi Guys, I have searched for different methods for this thing but couldn't get it right. Used AutoEllipses Property, Set the MaximumSize too but to no avail. How can i get a label to show the name of the file being scanned? I mean, the label should show some part from the beginning of full path of the file then some dots and then the file name with extension.
Posted
Updated 24-Sep-14 12:45pm
v2
Comments
Sergey Alexandrovich Kryukov 24-Sep-14 18:50pm    
Is it System.Windows.Forms.Label.AutoEllipsis? (Then your spelling is wrong.) Anything else?
I strongly recommend to be precise and use full names of types/members. There are too many similar names.
—SA
Rehan Shahzad Siddiqui 24-Sep-14 19:14pm    
Yes its System.Windows.Form.Label's property. Now please give me a solution. :)
[no name] 24-Sep-14 19:59pm    
Sorry, a solution to what? A solution to "couldn't get it right"? How would we know what it is that you would consider "right" or not?
Sergey Alexandrovich Kryukov 24-Sep-14 20:01pm    
It looks like only the default behavior is available. What is the difference that you want to make? Dots in different part of the string, or what?
Anyway, if you need something beyond the default, you will have to implement your own control, which is not very easy due to one known problem: it's difficult to measure rendered string accurately enough.
—SA

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