我使用一个标签,其中从文本框中输入的文本显示在该标签中。现在,我想让标签文本滚动。我通过互联网环顾四周,并尝试将其写入标签内的代码中:
private void label1_Click(object sender, EventArgs e)
{
int Scroll;
string strString = "This is scrollable text...This is scrollable text...This is scrollable text";
Scroll = Scroll + 1;
int iLmt = strString.Length - Scroll;
if (iLmt < 20)
{
Scroll = 0;
}
string str = strString.Substring(Scroll, 20);
label1.Text = str;
}
有人看到我做错了什么吗?