2
Reply

Is it possible to set the height and width of a label control in WinForms application?

Sushil Kumar

Sushil Kumar

12y
3.4k
0
Reply

    // Creating and setting the label
    Label mylab = new Label();
    mylab.Text = “GeeksforGeeks”;
    mylab.Location = new Point(222, 90);
    mylab.Size = new Size(120, 25);
    mylab.BorderStyle = BorderStyle.FixedSingle;

    // Adding this control to the form
    this.Controls.Add(mylab);

    Yes,it ispossible to set the height and width property ,,first you need to change the AUTOSIZE =true and then define the height & width in label property