本文介绍了如何计算richtextbox c中的项目数#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何计算rictextbox内的项目 并将其显示在标签上。 例如listbox
how do I count the items inside rictextbox and display it on a label. for example like listbox
label1.text = listbox1.items.count();我该怎么做with richtextbox
how do i do this with richtextbox
推荐答案试试这个: YourLabel.Text = YourRichTextBox.Lines.Length.ToString();
请记住,如果启用自动换行,可能会影响最终用户感知 RichtTextBox中行数的方式。
Keep in mind that if word-wrap is enabled, that may effect the way the end-user perceives the number of lines in a RichtTextBox.
更多推荐
如何计算richtextbox c中的项目数#
发布评论