我在C#Windows窗體中有此代碼。此代碼使標籤文本從右向左移動。但是,當文本在前看不見,它不會再從右到左來了.. 請人幫忙c#從右到左移動標籤
label21.Location = new Point(label21.Location.X - 15, label21.Location.Y);
if (label21.Location.X > this.Width)
{
label21.Location = new Point(0 - label21.Width, label21.Location.Y);
}
'label1.Width'是用來代替'label21.Width' –
@AlfieGoodacre是正確的,你是通過其他標籤的寬度重置標籤的位置。使用' - label21.Width'就足夠了。 – dcg
什麼文字在消失之前最初顯示? – i486