void UpdateCaret()
{
if (_byteProvider == null || _keyInterpreter == null)
return;
//System.Diagnostics.Debug.WriteLine("UpdateCaret()", "HexBox");
long byteIndex = _bytePos - _startByte;
PointF p = _keyInterpreter.GetCaretPointF(byteIndex);
p.X += _byteCharacterPos * _charSize.Width;
NativeMethods.SetCaretPos((int)p.X, (int)p.Y);
}