选择一行中的第一个单词 [英] Select First Word in a Line
本文介绍了选择一行中的第一个单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在尝试创建一种方法,如果您在另一个文本框中输入行(或行)编号,然后单击一个按钮,则在文本框中选择文本的行(或行)中的第一个单词.
有人可以帮我吗?
解决方案
您可以使用SelectionStart
属性,如 ^ ],以在按钮单击事件触发后在第一个文本框中选择文本.
>
Hi Everyone,
I''m trying to create a method by which the first word in a line (or row) of text is selected in a textbox if you enter a line (or row) number in another textbox and click a button.
Can anyone help me with this ?
解决方案
You can use the SelectionStart
property as demonstrated here[^] to select text in the first text box once the button click event fires.
这篇关于选择一行中的第一个单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文