回复 3楼etsoft的帖子
etsoft 你好,
把插入点挪动到 textfield 边缘代码如下:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.textControl1.Text = "";
- TextField field1 = new TextField();
- field1.Text = "中文";
- TextField field2 = new TextField();
- field2.Text = "English";
- textControl1.TextFields.Add(field1);
- textControl1.TextFields.Add(field2);
- textControl1.TextFieldClicked += textControl1_TextFieldClicked;
- textControl1.KeyDown += textControl1_KeyDown;
- }
-
- void textControl1_TextFieldClicked(object sender, TextFieldEventArgs e)
- {
- TextField clickField = e.TextField;
- int start = clickField.Start;
- int length = clickField.Length;
- this.textControl1.Select(start + length - 1, 0);
- }
复制代码
其余问题我正在调查。 |