开发者

create moving text

开发者 https://www.devze.com 2022-12-28 13:36 出处:网络
how can i makea text moving from top to bottom to top....(like a开发者_开发百科 news window) in a textBox (Assuming windows forms)

how can i make a text moving from top to bottom to top.... (like a开发者_开发百科 news window) in a textBox


(Assuming windows forms)

I haven't tried to do this before, but my first attempt would include loading a bunch of text (like new headlines) into a textbox, and then making a timer that changes the vertical scroll value on the tick event? A textbox has built-in functions called ScrollToLine(), ScrollToVerticalOffset(), etc. Otherwise some controls, like panels have more direct access to scrollbar values. For example: SplitContainer.Panel1.VerticalScroll.Value = value;

If those don't work, you can always draw the text yourself via graphics object and then update the positions items are drawn at.


you can use javascript to do it for web and if it is windows have a look at this question . Hope it helps

0

精彩评论

暂无评论...
验证码 换一张
取 消