Webdev here. Looking to explore C# Winforms by building a text filter app.
The idea is to create a app that takes a text file as input using the file dialog. Open it in the window such that each line in the file is shown on a new line. And there’s a textbox at top which accepts the filter keywords. This textbox will accept multiple keywords to look into each individual line in the file. Keywords will be separated by white space.
Now my questions are:
-
What would be the right control to load the text from file and show on separate lines? Also this control needs to have a click action in order to edit the contents of the line within the control or using another popup window ( like a modal maybe ). I was trying to use a listbox for this but not sure if its the right tool for the job.
-
After entering the keywords into the filter box, only the lines matching the filters eg. “one two” should show up. And double clicking these should allow me to edit the contents. So the control should support this functionality to show / hide the line item.
-
After all editing is done. I’d like to save the contents to the original file ( overwrite ) all the lines. ( edited & unedited )
Here is the UI
Typically I’ll be using something like a SPAN or DIV to load the text in a web app and use modal to edit and update text. Something of similar nature i need here to do the operations.
Apart from my question if there’s something I can improve in design or login, please let me know. I can figure out the logic to do the read & write file options, but need help picking the right controls for this job. Thanks.
5