Hello community!
We are using a Timer that sets the TextControl.EditMode to ReadAndSelect given certain criterias.
Problem: The cursor stops blinking in areas that still should have EditMode.Edit.
I included an example project:
In the project only the first 100 chars can be edited. Rest is ReadAndSelect-Only. Timer set to 99ms is used to check this.
If you comment the TextControlSetEditMode() method the cursor keeps blinking.
BlingBlingBlink.zip
You would be amazed (or maybe not :)) how fierce customers can get if you take away the blinking cursor!
Greetings and hoping for help,
Deniz
P.S.: Great new Forum-Feature that we users can attach files now!!!
We are using a Timer that sets the TextControl.EditMode to ReadAndSelect given certain criterias.
Problem: The cursor stops blinking in areas that still should have EditMode.Edit.
I included an example project:
In the project only the first 100 chars can be edited. Rest is ReadAndSelect-Only. Timer set to 99ms is used to check this.
If you comment the TextControlSetEditMode() method the cursor keeps blinking.
BlingBlingBlink.zip
Code:
using System;
using System.Windows.Forms;
namespace BlingBlingBlink
{
using TXTextControl;
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void OnTimerTick(object sender, EventArgs e)
{
VisualizeTimer();
//Comment this method an the cursor is blinking
//using this methos means: cursor stops blinking!
TextControlSetEditMode();
}
/// <summary>
/// Only first 100 chars can be edited. Rest is ReadAndSelect-Only
/// </summary>
private void TextControlSetEditMode()
{
textControl1.EditMode = EditMode.Edit;
if (textControl1.InputPosition.TextPosition > 100)
{
textControl1.EditMode = EditMode.ReadAndSelect;
}
}
private void VisualizeTimer()
{
this.Text += ".";
if (this.Text.Length > 50) this.Text = string.Empty;
}
private void OnFormSown(object sender, EventArgs e)
{
this.Text = string.Empty;
textControl1.Text =
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
}
}
}
Greetings and hoping for help,
Deniz
P.S.: Great new Forum-Feature that we users can attach files now!!!