EditorSearchView Mode

SyntaxEditor for Silverlight Forum

Posted 8 years ago by Thida Chiang
Version: 11.1.0111
Avatar
When I set search mode to 'Find' or 'Replace' programmatically, it does not change the focus of 'Quick Find' and 'Quick Replace' button in EditorViewSearch control. It only hides/displays the replace textbox.

Comments (8)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Thida,

That is correct, changing the Mode just alters the user interface but doesn't set focus to anything. You can call FocusFindWhatTextBox() to focus the find textbox.


Actipro Software Support

Posted 8 years ago by Thida Chiang
Avatar
Hi,
Switching mode should also change the focus of 'Quick Find' and 'Quick Replace'. After I set the mode to 'Replace', the 'Replace With' textbox is displayed but the focus stays on 'Quick Find' and it is confusing for user.

In visual studio, 'Ctrl+F' set the focus on the 'Quick Find' button and hides the 'Replace with:' textbox. Similary, 'Ctrl+H' set the focus on the 'Quick Replace' button and displays the 'Replace with' textbox.

Is it possible to put a fix for this?
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, we've updated it so clicking the Find/Replace mode toolbar buttons will focus the find textbox. This will be in the upcoming maintenance release.


Actipro Software Support

Posted 8 years ago by Thida Chiang
Avatar
Maybe I did not explain well. Focusing FindWhatTextBox is great but what I need is when we set the search mode programmatically, the focus of top toolbar buttons: 'Quick Find' and 'Quick Replace' should also get changed accordingly.

For Example: If I set the search mode to 'Find' with the code below, the 'Quick Find' button should be in focus.
EditorSearchView.Mode = ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorSearchMode.Find;
For Example: If I set the search mode to 'Replace' with the code below, the 'Quick Replace' button should be in focus.
EditorSearchView.Mode = ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorSearchMode.Replace;
Please let me know if this is not clear.
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
When I press Ctrl+F or Ctrl+H in Visual Studio it picks the correct mode (like what you are doing) but sets focus to the Find textbox, not to the mode buttons. This allows the user to start typing. So you should be calling EditorSearchView.FocusFindWhatTextBox() right after you set the mode.

We can't do that automatically on any mode change since sometimes you may wish to change the mode without focusing anything. However our update will focus the find textbox if the user clicks on a toolbar button for mode selection.


Actipro Software Support

Posted 8 years ago by Thida Chiang
Avatar
I want to implement the similar function as in Visual Studio with key bindings. When I set the search mode to 'Find' or 'Replace' based on the hot key that user presses, the search mode on the search control should reflect accordingly. It is not doing it right now.
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Oh, do you mean a "selected" or "checked" look on the buttons? By mentioning focus, I thought you meant keyboard focus. I'll look at the selected state now to see what's happening.


Actipro Software Support

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok, the toolbar button checked state is fixed for the upcoming build.


Actipro Software Support

The latest build of this product (v2018.1 build 0233) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.