C#: find and replace window prevents...

Started by
4 comments, last by eGamer 15 years, 9 months ago
i am developing a text editor in C#. in summary there is a main form that has a simple text area inside. as the user pressed ctrl+F i popup a window for find and replace similar to that found in word. as i found a word i want show it selected in the text area while the find window is still on top, unfortunately the find window is on top but the selected text on the text area of the main form is still unvisible untill it has the focus. how can i show the selection on the text area while the find window is still displayed? Thanks For Help
Advertisement
Make the Find and Replace window to be Always on Top(Topmost), and then set the focus to the Text control. This will make the F&R window always visible(As in Visual Studio / Word) but make it lose the focus when clicking somewhere else.

Toolmaker

That's exactly what i am doing.

but the problem is that find window is losing focus and that's not like in visual studio, how i can press the find next button if it has lost the focus.

notice how visual studio find window shows the selected button while it remains in focus so you can press find next multiple times.
?
I'm not entirely sure where you are getting at. Even in Visual Studio, the F&R window will lose focus. It will stay visible at all times(Topmost), but it will lose focus.

Please explain your problem more descriptive, because I don't understand. Hell, showing screenshots might help too.

Toolmaker

Set the HideSelection property of the text box to false.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Quote:Original post by benryves
Set the HideSelection property of the text box to false.


Thanks That's exactly what i wanted.

This topic is closed to new replies.

Advertisement