Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I need to be able to scroll text on a label i am using this for the credits portion of a tic tac toe game. How can I make this happen we've only been taught to scroll through number values in the scrollbar not text.

 private void xGameCreditsButton_Click(object sender, EventArgs e)
        {
            this.xWinnerLabel.BackColor = Color.White;
            this.xCreditsScrollBar.Visible = true;
            this.xWinnerLabel.Text = "This game was made possible with the help of: blah bla blah";
        }
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
167 views
Welcome To Ask or Share your Answers For Others

1 Answer

Instead of a Label, use a TextBox and set the ScrollBars, MultiLine and WordWrap properties according to your needs. To disable editing of the TextBox (and, thus, make it behave similar to a label), use the ReadOnly property.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...