圆形文字显示 [英] Circular Text Display

查看:91
本文介绍了圆形文字显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序正在监视数据源并发送消息.它旨在无限期地运行.我有一个用于显示状态消息的多行文本框,在text属性的末尾附加了新消息.问题 过一会儿,状态消息将溢出.

My application is monitoring a datasource and sending on messages. It's designed to keep running indefinately. I have a multi-line text box that I'm using to display status messages, with new messages appended to the end of the text property. The problem is after a while, the status message will overflow.

任何人都可以对如何保持状态消息的循环文本显示(不会溢出)提出任何建议吗?

Can anyone make any suggestions how to keep a circular text display of status messages that won't overflow?

伯尼

 

推荐答案

将列表视图绑定到消息列表,然后随意删除它们.

Bind a list view to a list of messages and then remove them at will.

 


           ListView listview = new ListView();

           listview.Items.Add(new ListViewItem("Some message"));
           if(listview.Items.Count> MaximumCount)listview.Items.RemoveAt(0);


            ListView listview = new ListView();

            listview.Items.Add(new ListViewItem("Some message"));
            if(listview.Items.Count > MaximumCount) listview.Items.RemoveAt(0);


这篇关于圆形文字显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆