Editors caret and focus

Editors for WPF Forum

Posted 15 years ago by Dmitry Kaganovich
Version: 9.1.0500
Avatar
First of all – your editors are awesome! Great Job!!


I’ve notice something that I’m not sure is a bug or a feature. Let’s say you place two editors in a stack
<StackPanel>
<editors:DoubleEditBox x:Name=”A” Value="3" />
<editors:Int32EditBox x:Name=”B” SpinnerVisibility="Visible" />
</StackPanel>
At run time, you click into “A” editor and type 4 (just to make the caret appear), now, while the B editor is showing “No value” click on that text -> that causes “No value” to change to *, however, the focus is still in editor “A” (caret is still blinking). This is the part I’m not sure is a bug or a feature – the way I use these editors, I need the focus to move to the clicked control (make the * highlited) and to achieve that, I subclass from DoubleEditBox and override OnPreviewMouseDown. Please let me know if that’s what I should be doing (this is a feature) or whether it’s a bug and will be changed (or maybe there is a way to get the focus on click, and I’ve just missed it)

protected override void OnPreviewMouseDown(System.Windows.Input.MouseButtonEventArgs e)
{
base.OnPreviewMouseDown(e);
this.Focus();
}

Dmitry

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Dmitry,

The second EditBox should be taking the focus when you click on it, so this is probably a bug. I will let you know when it is fixed.


Actipro Software Support

The latest build of this product (v24.1.2) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.