Visual Basic.NET - Texto Vertical en un control button
He encontrado este código para rotar el texto de un control button 90º en VB.net.
Me interesa modificarlo para que rote el texto 270º, yo no lo he conseguido.
¿Podéis ayudarme en esto?
Gracias y un cordial saludo
Public Class VerticalButton
Inherits Button
Public Property VerticalText As String
Private Fmt As New StringFormat
Public Sub New()
Fmt.Alignment = StringAlignment.Center
Fmt.LineAlignment = StringAlignment.Center
End Sub
Protected Overrides Sub OnPaint(ByVal pevent As System.Windows.Forms.PaintEventArgs)
MyBase. OnPaint(pevent)
pevent.Graphics.TranslateTransform(Width, 0)
pevent.Graphics.RotateTransform(90)
Pevent. Graphics.DrawString(_VerticalText, Font, Brushes. Black, New Rectangle(0, 0, Height, Width), Fmt)
End Sub
End Class
1 Respuesta
Respuesta de Juan Cosceri