Questions tagged [filedialog]

Refers to both OpenFileDialog and SaveFileDialog in .NET WinForms.

This tag represents both the OpenFileDialog class and SafeFileDialog class from .NET. More information about them on MSDN here and here respectively.

358 questions
0
votes
0 answers

How to use a button to save progress in a GUI and open the same contents later?

I'm creating a GUI with widgets, buttons, tabs, notes, and eventually will control a servo motor. In this GUI, there is the option to take notes, I'm wanting to save all the conent of the GUI, including the notes, to reopen and continue later. My…
Coding180
  • 23
  • 3
0
votes
1 answer

How to integrate the name of the file into a working word counter macro

I managed to adapt a vba macro (which I also found here) and got it running. So when the macro is started a file dialog asks me for the source file and the output gives me the word count of this file into cell "A1". Public Sub word_counter() …
Flamey
  • 1
0
votes
1 answer

Is there any way to set the command argument in add_command to change a value?

So, basically I'm trying to make a control menu in my tkinter app, and make a button open a file and save it to a variable. I want to see if I can do that using only lambda functions instead of normal functions (as in defining functions). Is there…
Tech Zachary ZN
  • 109
  • 1
  • 3
0
votes
2 answers

How is it an unmatched ")"?

Consider: from tkinter import * from tkinter import filedialog def openFile(): filepath = filedialog.askopenfile() file = open(filepath), 'r') print(file.read()) file.close() window = Tk() button =…
hahaly
  • 23
  • 4
0
votes
0 answers

COMDLG_FILTERSPEC file pattern appended to filter name if it includes more than one asterisc

I had this code that uses the legacy API function GetOpenFileName #include int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow) { OPENFILENAME ofn; char szFile[260]; HWND hwnd = NULL; HANDLE…
0
votes
0 answers

Why is everything freezing when I'm using Tkinter's file dialogue windows?

Sorry this is so long but I'm trying to be detailed. I found a similar question, but it was related to an import that I'm not using (so was the solution, so I'm not sure how relevant it is). The TL;DR is that I'm learning Tkinter and learning how to…
0
votes
1 answer

Outlook VBA - Filedialog behind windows

I am having trouble with a filedialog in Outlook VBA Macros, the problem is that the filedialog is generated by a word application and when it opens, it always opens behind all the windows, the opened email is hided, while the main Outlook…
TechMatt__
  • 31
  • 5
0
votes
4 answers

Tkinter: print (.txt) filepath to text widget AND (.txt) file content to scrolledtext widget in the same gui with one filedialogue access

As a follow-up question to this: Python tkinter - how to send StringVar() content to Scrolled Text box using grid() and using procedural code I know how to print the filepath to a text widget field GUI. I know how to put the contents of a text file…
0
votes
1 answer

Prevent Tkinter askopenfilenames from ordering files

I try to make a tool that can merge multiple pdf file types, I use askopenfilenames method, select the files and when I print the files it looks like they are ordered alphabetically. Is there a way to save them in the order of selection? To prevent…
0
votes
1 answer

Asking the user for directories or files at the same time

Is there any way that you can ask the user to choose files or folders without using multiple statements? I know there is filedialog and I can use askopenfilenames() and Directory() to make the user choose in multiple statements but is there…
user14191647
0
votes
1 answer

How to copy data from source workbook to current workbook through Application.FileDialog(msoFileDialogFilePicker)

I am trying to copy data from my source workbook by using FileDialog(msoFileDialogFilePicker). but the code is always stuck at "sourceworkbook.Worksheets("sheet1").Activate", I assume it is BCS the selected file is too big so the Micro is not able…
NickNick
  • 3
  • 1
0
votes
0 answers

How to upload file in python Tkinter to current directory?

I am making a GUI in python with Tkinter. I can browse a file, print the path for it, but how is it possible to save the browsed file into a specific folder (for example the current folder /home/pi/Desktop/gui). Also I want to add the path for the…
0
votes
2 answers

Unable to save file path using tkinter filedialog askopenfilename, triggred through a button

I need to save the file path returned by askopenfilename within tkinter filedialog for later use I trigger the function openFile via a button which I define and I expect this function to store the requested file's path, I tried using global…
Pawan Nirpal
  • 565
  • 1
  • 12
  • 29
0
votes
0 answers

Is there a way to disable the top directory menu in the FileDialog in tkinter?

I have file dialog, where I click "open" it will open the filedialog. However, I need to restrict user to only select the files in current folder. How do I disable the top folder navigation menu option for the askopenfilename function? so they…
Amy
  • 1
0
votes
2 answers

Picture won't open in File Dialog, Tkinter, Pillow

I have written this. Its short and supposed to open a file dialog window, with buttons "open a file, turn, save, exit." I want to open a jpeg, turn it 180° and then save it and quit. The program starts, but doesnt open the picture in the file dialog…