C
C#11mo ago
Turtles

how to add a file select dialogue box to a console based app

hello! i know that you cant actually do what i said i wanted to do in the title of this post, but, i was wondering if there was some way to easily get from my console based code to something that would allow me to include a file select dialogue box
7 Replies
Denis
Denis11mo ago
The best and most native console way of doing this would be to display the file selection using text in the console Otherwise... I believe you'd have to reference one of the available UI framework's libraries to access a file selection dialog But even so, that would be like creating a Frankenstein's monster.
Turtles
TurtlesOP11mo ago
yeah thats what i though thought* ive heard of the possibility of allowing just dropping a file to select it? is that possible?
Mayor McCheese
Mayor McCheese11mo ago
why not just provide by command line args?
jcotton42
jcotton4211mo ago
at least on Windows, the path to a dragged in file will be pasted in when you drop it on the console so just do a Console.ReadLine()
Lex Li
Lex Li11mo ago
If you want to write such an app, you should evaluate if Terminal.Gui is the option, https://github.com/gui-cs/Terminal.Gui
GitHub
GitHub - gui-cs/Terminal.Gui: Cross Platform Terminal UI toolkit fo...
Cross Platform Terminal UI toolkit for .NET. Contribute to gui-cs/Terminal.Gui development by creating an account on GitHub.
Turtles
TurtlesOP11mo ago
wow this looks really cool im definitely going to look into using this
Pobiega
Pobiega11mo ago
Its very good, but your code will end up being very similar to a full GUI app
Want results from more Discord servers?
Add your server