Are there any automatic methods for trimming a path string in .NET?
For example:
C:\Documents and Settings\nick\My Documents\Tests\demo data\demo data.emx
becomes
C:\Documents...\demo data.emx
It would be particularly cool if this were built into the Label class, and I seem to recall it is–can’t find it though!
Use TextRenderer.DrawText with TextFormatFlags.PathEllipsis flag
Yes thanks, I was aware of that. My intention was only to demonstrate use of
DrawTextmethod. I didn’t know whether you want to manually create event for each label or just overrideOnPaint()method in inherited label. Thanks for sharing your final solution though.