【问题标题】:is there any way to know the position of my cursor - in TextBox control?有什么方法可以知道我的光标的位置 - 在 TextBox 控件中?
【发布时间】:2011-04-28 10:25:17
【问题描述】:

我的 C# (WinForms) 程序中有 TextBox 控件

如果我有这个文本:abcd efg hijklmnop

我的光标位于 cd 之间 = 位置 3

或者我的光标在 hi 之间 = 位置 10

如何获得这个职位?

先谢谢了

【问题讨论】:

    标签: c# winforms


    【解决方案1】:

    您是否尝试过使用应该具有当前光标位置的TextBox.SelectionStart

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多