0

I want to rotate the label 90 degrees but using properties

                this.lblVoltage6.AutoSize = true;
                this.lblVoltage6.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold);
                this.lblVoltage6.Location = new System.Drawing.Point(52, 61);
                this.lblVoltage6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
                this.lblVoltage6.Name = "lblVoltage6";
                this.lblVoltage6.Size = new System.Drawing.Size(11, 13);
                this.lblVoltage6.TabIndex = 101;
                this.lblVoltage6.Text = "-";
Metehan
  • 41
  • 8
  • 2
    Can't do with properties (well, you can - but you have to make a custom control with a prop to control rotation, see - https://stackoverflow.com/questions/12601774/how-can-i-flip-rotate-the-label-in-c-windows-forms ? – Caius Jard Dec 26 '20 at 21:45

1 Answers1

1

Unfortunately, you cannot rotate text in a WinForms label. If you really want to do it, you have to handle the Paint event and write code to rotate the text.

Alex Essilfie
  • 12,339
  • 9
  • 70
  • 108