Parameswaran R

Parameswaran R

  • NA
  • 254
  • 6.5k

How to set auto size the dynamic label box in c#?

Jan 27 2016 2:30 AM

I have tried follow code, My question passed to Label text, Question size longer than label text, So Can't view full question in label Box. Please solve this bug.

Label dynamiclabel = new Label(); dynamiclabel.Location = new Point(38, 30); dynamiclabel.Size = new Size(200, 32); dynamiclabel.Name = "lbl_ques"; dynamiclabel.Text = question;                dynamiclabel.AutoSize = true; dynamiclabel.Size = new System.Drawing.Size(900, 26); dynamiclabel.Font = new Font("Arial", 12, FontStyle.Regular);

Answers (2)