VerticalLabel

VerticalLabel

This is a custom control I wrote, first in VB.Net, but I converted it to C# as a learning exercise. I used the telerik (http://converter.telerik.com/) online converter and then fixed the inevitable conversion errors with a little help from the IDE (Integrated Development Environment).

The control is an extension of the Control class, which is a fully functioning Vertical Label control. It is designed to always be AutoSized. You can set upToDown to change whether the caption reads from top to bottom, or from bottom to top. You can also set BackColor, ForeColor, and Font, and the control will redraw with your new settings.

Creating a control from the base class Control is preferable in my opinion to creating a UserControl but I could have used either method. Usually when creating a control, I remove any extraneous properties, but I left all of the standard properties in this control.

I originally wrote a bare bones version of this control to answer a question in a forum. After deciding that this control could be useful in many real world applications, I modified and improved it to the current version with the aforementioned properties, and then converted it to C#.net so I could upload two different language versions here on TechNet.



VB.Net version (VS2008)
C# version (VS2008)

Leave a Comment
  • Please add 6 and 4 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Maheshkumar S Tiwari edited Original. Comment: Added tags

  • Why VS 2008?

  • It was originally because vb2010 was a bit slower in the IDE, but now I use vb2008 for most projects, although I have the professional versions of vb2005, 8, 10, 12. Occasionally, when I need the features, I use a different version.

Page 1 of 1 (3 items)