Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本的に、異なるラベルを異なる行に配置したいと思います。
protected void Button2_Click(object sender, EventArgs e) { Label2.Text = Label3.Text + Label1.Text; }
Label1.Text下の行にを表示したいLabel3.Text。幅と高さを微調整したくないので、ラベルのテキストがすべてのラベルで同じ幅になるわけではありません。
Label1.Text
Label3.Text
間に使用<br/>してみてくださいそれはうまくいくはずです
<br/>
Label2.Text = Label3.Text +"<br/>"+ Label1.Text;
よりエレガントなアプローチ:
Label2.Text = Label3.Text + Environment.NewLine() + Label1.Text;