gpt4 book ai didi

c# - 如何在 C# Windows 应用程序中增加标签框文本大小?

转载 作者:行者123 更新时间:2023-12-02 17:31:10 25 4
gpt4 key购买 nike

我使用以下代码,当我运行以下代码时,一半的文本仅显示在标签框中。我想在标签框文本中显示整行?怎么做?

Label dynamiclabel1 = new Label();
dynamiclabel1.Location = new Point(280, 90);
dynamiclabel1.Name = "lblid";
dynamiclabel1.Size = new Size(150, 14);
dynamiclabel1.Text="Smith had omitted the paragraph in question (an omission which had escaped notice for twenty years) on the ground that it was unnecessary and misplaced; but Magee suspected him of having been influenced by deeper reasons.";
dynamiclabel1.AutoSize = true;
dynamiclabel1.Font = new Font("Arial", 10, FontStyle.Regular);
panel1.Controls.Add(dynamiclabel1);

最佳答案

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

关于c# - 如何在 C# Windows 应用程序中增加标签框文本大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35059699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com