Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-16 Thread Michael Lange
Hi, On Wed, 15 May 2019 05:50:24 + Vasilis Vlachoudis wrote: > Thanks. > I did what you proposed > if event.state>=256: # then mouse event, ignore... > > Maybe a bug report should be opened in XFCE? In the X11 events it states > that Enter/LeaveNotify is only due to the cursor movement > en

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-15 Thread Michael Lange
Hi, On Wed, 15 May 2019 05:50:24 + Vasilis Vlachoudis wrote: > Thanks. > I did what you proposed > if event.state>=256: # then mouse event, ignore... > > Maybe a bug report should be opened in XFCE? In the X11 events it states > that Enter/LeaveNotify is only due to the cursor movement > en

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-14 Thread Vasilis Vlachoudis
lis From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of Michael Lange [klappn...@web.de] Sent: Tuesday, May 14, 2019 18:26 To: tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter Hi, On Tue, 14

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-14 Thread Michael Lange
Hi, On Tue, 14 May 2019 13:53:54 + Vasilis Vlachoudis wrote: > Thanks all for your replies. > I've saw that there is a difference in the event.state, but I cannot > find any information on what each bit represents. > I modified your leave() callback using the values given at: https://infoho

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-14 Thread Vasilis Vlachoudis
lf of mkie...@web.de [mkie...@web.de] Sent: Monday, May 13, 2019 19:32 To: tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter Hello, >very strange. Maybe an issue with the WM? Do you also use Xfce? Did you >(or Vasilis) try a different WM? To add some

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread Michael Lange
Hi, On Mon, 13 May 2019 17:32:10 - mkie...@web.de wrote: > Hello, > > >very strange. Maybe an issue with the WM? Do you also use Xfce? Did you > >(or Vasilis) try a different WM? > > To add some data about used WMs, not reproducible on: > Python 3.5.3 (some small tkinter patches) > tcl/tk 8.6

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread mkiever
Hello, >very strange. Maybe an issue with the WM? Do you also use Xfce? Did you >(or Vasilis) try a different WM? To add some data about used WMs, not reproducible on: Python 3.5.3 (some small tkinter patches) tcl/tk 8.6.6 debian stretch ctwm Regards, Matthias ---

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread Michael Lange
On Mon, 13 May 2019 10:27:12 +0200 Paul Malherbe wrote: > Yes, definitely seems to be an xfce thing. Tried with gnome and worked > fine. Good to know that. Unfortunately this does not help much with the OP's question :-( Maybe some property of the event could be checked, if there is a difference

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread Paul Malherbe
Title: signature Hi Yes, definitely seems to be an xfce thing. Tried with gnome and worked fine. Regards Paul Malherbe Tartan Systems Phone +27(0)82 900

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread Michael Lange
Hi, On Mon, 13 May 2019 08:19:58 +0200 Paul Malherbe wrote: > Same happens on Ubuntu 18.04 with python 2.7.15/3.6.7 and tcl/tk 8.6.8 very strange. Maybe an issue with the WM? Do you also use Xfce? Did you (or Vasilis) try a different WM? Regards Michael .-.. .. ...- . .-.. --- -. --. .-

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-13 Thread Paul Malherbe
kinter-discuss@python.org Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter Hi Michael, I am using Ubuntu 19.04 with python 3.7 and tk 8.6.9+1 Vasilis Vlachoudis Dep EN, CERN CH-1211 GEN

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-12 Thread engelbert gruber
hon.org] on behalf of Vasilis Vlachoudis [ > vasilis.vlachou...@cern.ch] > Sent: Sunday, May 12, 2019 19:49 > To: Michael Lange; tkinter-discuss@python.org > Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter > > Hi Michael, > > I am using Ubuntu 19.04 > with python

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-12 Thread Vasilis Vlachoudis
Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter Hi Michael, I am using Ubuntu 19.04 with python 3.7 and tk 8.6.9+1 Vasilis Vlachoudis Dep EN, CERN CH-1211 GENEVA 23 SWITZERLAND Phone: +41-22 767 9851 GSM:+41-75 411 4378 From: Tkinter

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-12 Thread Vasilis Vlachoudis
...@python.org] on behalf of Michael Lange [klappn...@web.de] Sent: Saturday, May 11, 2019 00:57 To: tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] Button event calls Leave/Enter Hi, On Thu, 9 May 2019 07:58:42 + Vasilis Vlachoudis wrote: > Hi all, > > I've just rea

Re: [Tkinter-discuss] Button event calls Leave/Enter

2019-05-10 Thread Michael Lange
Hi, On Thu, 9 May 2019 07:58:42 + Vasilis Vlachoudis wrote: > Hi all, > > I've just realized that the mouse click event generates as > well a followed by event before. what system are you using and which version of Tcl/Tk? I cannot reproduce that behavior here (Debian, Tk 8.6.6). Regard

[Tkinter-discuss] Button event calls Leave/Enter

2019-05-09 Thread Vasilis Vlachoudis
Hi all, I've just realized that the mouse click event generates as well a followed by event before. With the program below, if one clicks in the frame you get the messages printed Leave event Enter event Button1 pressed Which I don't understand the reasoning behind. However it generates a probl

Re: [Tkinter-discuss] Button Press Freezes

2013-06-13 Thread mkieverpy
Quaki Gaffar: >Here's my situation. I have two tkinter buttons: > >Play Button: plays a sound >Stop Button: to stop the sound during play > >Code is as follows: > >def Play(self): >//plays a file with pygame module > >def Stop(self): >//Stop using pygame stop Greg Ewing: >No, mus

Re: [Tkinter-discuss] Button Press Freezes

2013-05-18 Thread Michael Lange
Hi, On Thu, 16 May 2013 14:08:10 +1200 Greg Ewing wrote: > No, music.play() is not supposed to block. However, I haven't tried to > use it outside the context of a pygame app, so I don't know how it > behaves if there isn't a pygame event loop running. Ok, now I got curious and gave it a try an

Re: [Tkinter-discuss] Button Press Freezes

2013-05-15 Thread Greg Ewing
On 16/05/13 03:49, Michael Lange wrote: I never used pygame myself, so I can only guess that the pygame method you use (pygame.mixer.music.play()?) does not return until the playback is done. No, music.play() is not supposed to block. However, I haven't tried to use it outside the context of a

Re: [Tkinter-discuss] Button Press Freezes

2013-05-15 Thread Michael Lange
Hi, On Wed, 15 May 2013 15:31:32 +0530 Quaki Gaffar wrote: > Here's my situation. I have two tkinter buttons: > > Play Button: plays a sound > Stop Button: to stop the sound during play > > Code is as follows: > > def Play(self): > //plays a file with pygame module > > def Stop(s

[Tkinter-discuss] Button Press Freezes

2013-05-15 Thread Quaki Gaffar
Here's my situation. I have two tkinter buttons: Play Button: plays a sound Stop Button: to stop the sound during play Code is as follows: def Play(self): //plays a file with pygame module def Stop(self): //Stop using pygame stop Button( root, text ='Play', command= Play).pack

Re: [Tkinter-discuss] Button-press on Menubuttons

2011-11-27 Thread Michael Lange
Thus spoketh Cam Farnell unto us on Sat, 26 Nov 2011 15:54:51 -0400: > Thanks, using the postcommand option does the job but it still strikes > me as odd that a menubutton which has been been activated by clicking > on it doesn't generate a event. > Now, I guess what actually happens is this:

Re: [Tkinter-discuss] Button-press on Menubuttons

2011-11-26 Thread Cam Farnell
Thanks, using the postcommand option does the job but it still strikes me as odd that a menubutton which has been been activated by clicking on it doesn't generate a event. Cam On 11-11-26 02:37 PM, Michael Lange wrote: Hi, Thus spoketh Cam Farnell unto us on Sat, 26 Nov 2011 12:54:09 -0400

Re: [Tkinter-discuss] Button-press on Menubuttons

2011-11-26 Thread Michael Lange
Hi, Thus spoketh Cam Farnell unto us on Sat, 26 Nov 2011 12:54:09 -0400: (..) > > If the user clicks on Menubutton-A then the corresponding handler runs > as expected. If, without making a choice from menu A, the user then > clicks on Menubutton-B then - and this is the nub of the problem - th

[Tkinter-discuss] Button-press on Menubuttons

2011-11-26 Thread Cam Farnell
I have a bunch of Menubuttons in my application, lets call them A, B and C. Each Menubutton is bound to so, before the menu choices are displayed, I can enable/disable some of those choices depending on the situation at the time, and each binding leads to its own Menubutton-specific handler.

Re: [Tkinter-discuss] Button command callback question -- Part 2

2011-07-18 Thread Lion Kimbro
I would also add a caution: If you assign x *anywhere* within the function, a prior use will fail... def foo(): print x# raises UnboundLocalError, x = 10 # ...because the interpreter knows that x is local. Only unassigned values are searched for in the global namespace,

Re: [Tkinter-discuss] Button command callback question -- Part 2

2011-07-18 Thread Michael Lange
Hi, Thus spoketh GKalman unto us on Mon, 18 Jul 2011 05:24:53 -0700 (PDT): (...) > > #NOTE that it works even when the mainloop() method below is commented > out > #root.mainloop() > #=== > > so: if > (1) there is no mainlo

[Tkinter-discuss] Button command callback question -- Part 2

2011-07-18 Thread GKalman
Thanks for the replies for my earlier question. I should have stated my question in a better way. My question is related to SCOPE! For example: # from Tkinter import * #- def doIt(): print x #

Re: [Tkinter-discuss] Button

2011-05-23 Thread Alan Gauld
"psao pollard-flamand" wrote You know when you click a tkinter button and the window usually freezes until its done? Actually it doesn't *usually* freeze because most Tkinter apps are designed to prevent that :-) Does any one know how to stop that? The key here is that GUI event handl

Re: [Tkinter-discuss] Button

2011-05-18 Thread Michael O'Donnell
Hi Peter. I have somehow not sen mtTkinter before. Looks great, will try it out. Mick On Thu, May 19, 2011 at 3:18 AM, Peter Milliken wrote: > Do you use mtTkinter Michael? > Best package since "sliced bread" (as the saying goes) - I haven't had any > issues with GUI elements and tasking sinc

Re: [Tkinter-discuss] Button

2011-05-18 Thread Peter Milliken
Do you use mtTkinter Michael? Best package since "sliced bread" (as the saying goes) - I haven't had any issues with GUI elements and tasking since using it. It has cured ALL of my issues with tasks and Tkinter GUI's freezing and behaving weirdly since I first discovered it. In my threads (checke

Re: [Tkinter-discuss] Button

2011-05-18 Thread Michael O'Donnell
yes, Threading is the other solution. One needs to be very careful not to call any Tkinter elements from the child threads, as it seems this can cause freezes. I used threads for a while, but could not solve the odd cases where my interface froze until the child thread finished. In any case, see

Re: [Tkinter-discuss] Button

2011-05-18 Thread Peter Milliken
Michael offers excellent solutions. When the work being done is cpu intensive (and the application allows :-)), I often use threading i.e. the button runs a command that starts a Python thread which goes off and does what needs to be done. If the job being performed is that intensive then you pr

Re: [Tkinter-discuss] Button

2011-05-18 Thread Michael O'Donnell
On Wed, May 18, 2011 at 5:01 PM, psao pollard-flamand wrote: > You know when you click a tkinter button and the window usually freezes > until its done? Does any one know how to stop that? This may or may not fix your problem, depending on your updating problem. Instead of: Button(tkwin, te

[Tkinter-discuss] Button

2011-05-18 Thread psao pollard-flamand
You know when you click a tkinter button and the window usually freezes until its done? Does any one know how to stop that? Sent from my Windows Phone___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tki

Re: [Tkinter-discuss] Button Overrelief

2006-06-29 Thread Michael Foord
Fredrik Lundh wrote: > Michael Foord wrote: > > >> I have some Tkinter buttons that display images. I would like to change >> these to 'active' images when the mouse is over the button. >> >> I see that the button widget can take an 'overrelief' argument in the >> constructor. What values can th

[Tkinter-discuss] Button Overrelief

2006-06-27 Thread Fuzzyman
Hello all, I have some Tkinter buttons that display images. I would like to change these to 'active' images when the mouse is over the button. I see that the button widget can take an 'overrelief' argument in the constructor. What values can this take ? Also - can anyone provide an example of us

Re: [Tkinter-discuss] Button Overrelief

2006-06-27 Thread Fredrik Lundh
Michael Foord wrote: > I have some Tkinter buttons that display images. I would like to change > these to 'active' images when the mouse is over the button. > > I see that the button widget can take an 'overrelief' argument in the > constructor. What values can this take ? same as RELIEF; see

[Tkinter-discuss] Button Overrelief

2006-06-27 Thread Michael Foord
Hello all, I have some Tkinter buttons that display images. I would like to change these to 'active' images when the mouse is over the button. I see that the button widget can take an 'overrelief' argument in the constructor. What values can this take ? Also - can anyone provide an example of us