将输入到RichTextBox中的单词计数到工具上 [英] counting words that are typed into a richtextbox onto a toolstripstatuslabel

查看:147
本文介绍了将输入到RichTextBox中的单词计数到工具上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我正在用ruby编程语言构建应用程序
我有一个toolStripStatus和一个richtextbox.我想要做的是键入到richtextbox中的每个单词,我希望它添加到toolStripStatuslabel1上.
toolStripStatuslabel1被称为单词
这是我使用的代码

def MainFormLoad(sender,e)
#显示输入的单词数
计数+ = 1
下一个
toolStripStatusLabel1.Text =单词:"&Document.Text.Count

结束
end

hey am building an application in the ruby programming language
and i got a toolStripStatus and a richtextbox. what i want to do is every word that is typed into the richtextbox i want it to add up on the toolStripStatuslabel1.
toolStripStatuslabel1 is called Words
here is the code i used

def MainFormLoad(sender, e)
# displays the amount of words being typed
count += 1
next
toolStripStatusLabel1.Text = "Words:" & Document.Text.Count

end
end

推荐答案

//option 1

//option 1

<script type="text/javascript">


(document).ready(function(){ var length = 200; //预定义的文本框字符大小 剩余的var = 200; var txtBox =
(document).ready(function () { var length = 200; // predefined textbox char size var remaining = 200; var txtBox =


(#%> ; ); txtBox.onchange(function(){ 剩余=(长度-txtBox.val().length);
("#<%=TextBox.ClientID %>"); txtBox.onchange(function () { remaining = (length - txtBox.val().length);


这篇关于将输入到RichTextBox中的单词计数到工具上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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