In FXRuby; how do I set the FXFileDialog to be at the home directory when it opens?
In FXRuby; how do I set the FXFileDialog to be at the home directory
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s an exceedingly lazy way to do it:
This relies on you being on a *nix box (or having the $HOME environment variable set). The lines that specifically answer your question are:
Here, the first argument is the window that owns the dialog box, the second is the title of the window, and the third is the default path to start at (you need the ‘/’ at the end otherwise it’ll start a directory higher with the user’s home folder selected). Check out this link for more info on FXFileDialog.