使用 control.SelectionStart = control.Text.Length;
- private void FpSpread1_EditChange(object sender, EditorNotifyEventArgs e)
- {
- if (e.EditingControl is GcTextBoxEditingControl)
- {
- var control = e.EditingControl as GcTextBoxEditingControl;
- if (control.Text.Length > 0 && control.Text.Last() == '.')
- {
- control.Text = control.Text.Remove(control.Text.Length - 1);
- control.SelectionStart = control.Text.Length;
- }
- }
- }
复制代码 |