[issue26405] tkinter askopenfilename doubleclick issue on windows

2016-02-21 Thread rapolas

New submission from rapolas:

Issue is that doubleclick passes a click down to a parent window, and if it 
happens that you doubleclicking to select a file directly above some button, 
that button gets pressed. Here is the code to demonstrate this issue:

import tkinter as tk
from tkinter import filedialog, ttk

class MainWindow(ttk.Frame):
def __init__(self, root, *args, **kwargs):
super().__init__(root, *args, **kwargs)
self.pack()
btnoptions = {'expand':True, 'fill': 'both'}
btn = ttk.Button(self, text='Select', command=self.ask_openfile)
btn.pack(**btnoptions)

def ask_openfile(self):
filename = filedialog.askopenfilename()
return filename

if __name__=='__main__':
root = tk.Tk()
root.geometry('600x300')
MainWindow(root).pack(expand=True, fill='both', side='top')
root.mainloop()

I observed the same behavior on two different computers, one running win10, 
another win7, both using the latest python 3.5.1 installation from python.org

--
components: Tkinter
messages: 260640
nosy: rapolas
priority: normal
severity: normal
status: open
title: tkinter askopenfilename doubleclick issue on windows
type: behavior
versions: Python 3.5

___
Python tracker 
<http://bugs.python.org/issue26405>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26405] tkinter askopenfilename doubleclick issue on windows

2016-02-23 Thread rapolas

rapolas added the comment:

Just tried this on Python 2.7.11 and the issue is not present.

--

___
Python tracker 
<http://bugs.python.org/issue26405>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26405] tkinter askopenfilename doubleclick issue on windows

2016-02-24 Thread rapolas

rapolas added the comment:

I tried on Linux as well, issue wasn't present. Attached tcl script has the 
same behavior.

And I found this already reported on tk tracker:

https://core.tcl.tk/tk/tktview?name=faf37bd379

--

___
Python tracker 
<http://bugs.python.org/issue26405>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com