From camfarnell at cogeco.ca Mon Apr 3 01:23:43 2006 From: camfarnell at cogeco.ca (Cam) Date: Sun, 02 Apr 2006 19:23:43 -0400 Subject: [Tkinter-discuss] Framed Message-ID: <44305CFF.3020706@cogeco.ca> Hello list, The following little test program works as expected. But if you change the line marked "----- Here ----" so it reads: self.Frame2 = Pmw.ScrolledFrame(self) then it blows up on an error deep inside Tkinter when attempting to create the button mentioned on the following line. All I wanted to do was trade a Frame for a ScrolledFrame. I'm stumped as to why it blows up. Anybody out there know? Thanks Cam ps I realize that in this example Frame2 is redundant. I encountered the problem in a larger case. To generate the example shown below I stripped out pretty much everything that wasn't necessary to demonstrate the problem. - - - - - import Pmw from Tkinter import * class Test(Frame): def __init__(self,Master=None,**kw): apply(Frame.__init__,(self,Master),kw) self.Frame2 = Frame(self) #<---- HERE ---- self.Frame2.pack(side='left') self.Button1 = Button(self.Frame2) self.Button1.pack(side='top') Root = Tk() Pmw.initialise(Root) App = Test(Root) App.pack(expand='yes',fill='both') Root.geometry('640x480+10+10') Root.mainloop() From mfranklin1 at gatwick.westerngeco.slb.com Mon Apr 3 09:38:08 2006 From: mfranklin1 at gatwick.westerngeco.slb.com (Martin Franklin) Date: Mon, 03 Apr 2006 08:38:08 +0100 Subject: [Tkinter-discuss] Framed In-Reply-To: <44305CFF.3020706@cogeco.ca> References: <44305CFF.3020706@cogeco.ca> Message-ID: <4430D0E0.8090904@gatwick.westerngeco.slb.com> Cam wrote: > Hello list, > > The following little test program works as expected. But if you change > the line marked "----- Here ----" so it reads: > > self.Frame2 = Pmw.ScrolledFrame(self) > The internal frame (the one sub-widgets go into) is not the scrolled frame itself. It should mention this in the Pmw docs... don't have then handy atm Change this: > self.Frame2 = Pmw.ScrolledFrame(self) to: > self.Frame2 = Pmw.ScrolledFrame(self).interior() Cheers Martin > then it blows up on an error deep inside Tkinter when attempting to > create the button mentioned on the following line. All I wanted to do > was trade a Frame for a ScrolledFrame. I'm stumped as to why it blows > up. Anybody out there know? > > Thanks > > Cam > > ps I realize that in this example Frame2 is redundant. I encountered the > problem in a larger case. To generate the example shown below I stripped > out pretty much everything that wasn't necessary to demonstrate the problem. > > - - - - - > > import Pmw > from Tkinter import * > > class Test(Frame): > def __init__(self,Master=None,**kw): > apply(Frame.__init__,(self,Master),kw) > self.Frame2 = Frame(self) #<---- HERE ---- > self.Frame2.pack(side='left') > self.Button1 = Button(self.Frame2) > self.Button1.pack(side='top') > > Root = Tk() > Pmw.initialise(Root) > App = Test(Root) > App.pack(expand='yes',fill='both') > Root.geometry('640x480+10+10') > Root.mainloop() > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > http://mail.python.org/mailman/listinfo/tkinter-discuss > From m_tayseer82 at yahoo.com Mon Apr 3 13:26:16 2006 From: m_tayseer82 at yahoo.com (Mohammad Tayseer) Date: Mon, 3 Apr 2006 04:26:16 -0700 (PDT) Subject: [Tkinter-discuss] Framed In-Reply-To: <4430D0E0.8090904@gatwick.westerngeco.slb.com> Message-ID: <20060403112616.39095.qmail@web31108.mail.mud.yahoo.com> Martin's code didn't work, at least on my machine (Win XP). I tried a little change self.Frame2 = Pmw.ScrolledFrame(self) will remain as it is, but change the button instantiation to self.Button2 = Button(self.Frame2.interior()) this can be found in Pmw docs. See "Extending Pmw megawidgets" at http://pmw.sourceforge.net/doc/howtouse.html Martin Franklin wrote: > self.Frame2 = Pmw.ScrolledFrame(self).interior() --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060403/7afefa7b/attachment.html From camfarnell at cogeco.ca Mon Apr 3 18:43:31 2006 From: camfarnell at cogeco.ca (Cam) Date: Mon, 03 Apr 2006 12:43:31 -0400 Subject: [Tkinter-discuss] Framed In-Reply-To: <20060403112616.39095.qmail@web31108.mail.mud.yahoo.com> References: <20060403112616.39095.qmail@web31108.mail.mud.yahoo.com> Message-ID: <443150B3.3060407@cogeco.ca> Ok, got it now although now I feel a bit stupid. On one level I knew perfectly well that all those Pmw things aren't what they claim to be, ie ScrolledListBox doesn't derive from Listbox, ScrolledText doesn't derive from Text and ... well for some reason I was thinking that ScrolledFrame actually derived from Frame rather than containing a Frame component. Thanks for the help. Cam Mohammad Tayseer wrote: > Martin's code didn't work, at least on my machine (Win XP). > I tried a little change > > self.Frame2 = Pmw.ScrolledFrame(self) > > will remain as it is, but change the button instantiation to > > self.Button2 = Button(self.Frame2.interior()) > > this can be found in Pmw docs. See "Extending Pmw megawidgets" at > http://pmw.sourceforge.net/doc/howtouse.html > > /Martin Franklin / wrote: > >> self.Frame2 = Pmw.ScrolledFrame(self).interior() > From brennan162 at sbcglobal.net Tue Apr 4 21:48:02 2006 From: brennan162 at sbcglobal.net (fxe) Date: Tue, 4 Apr 2006 12:48:02 -0700 (PDT) Subject: [Tkinter-discuss] canvas binding Message-ID: <3751619.post@talk.nabble.com> Hi, Is it possible to have a both a rectangle and an oval drawn on the same canvas yet only have bindings work on the rectangle. I would think it is possible but I seem to be having a big problem with this. -- View this message in context: http://www.nabble.com/canvas-binding-t1395201.html#a3751619 Sent from the Python - tkinter-discuss forum at Nabble.com. From geon at post.cz Wed Apr 5 07:56:00 2006 From: geon at post.cz (Pavel Kosina) Date: Wed, 05 Apr 2006 07:56:00 +0200 Subject: [Tkinter-discuss] thicker lines Message-ID: <44335BF0.9020506@post.cz> I would like to ask for bright and simple idea how to draw thicker lines between each 3 fields in this grid. Its about sudoku so the slines should be there 4: 2 horizontaly a 2 vertikaly and maybe one around. Some idea is already present with me but its quite complicated. from Tkinter import * root=Tk() size=2 for i in range(81): _row, _column=divmod(i,9) butt=Button(root, text=str(i), height=size, width=size*2, relief=RAISED) butt.grid(row=_row, column=_column) root.title("sudoku") root.mainloop() Thank you -- Pavel Kosina From stewart.midwinter at gmail.com Wed Apr 5 08:11:43 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Wed, 5 Apr 2006 00:11:43 -0600 Subject: [Tkinter-discuss] thicker lines In-Reply-To: <44335BF0.9020506@post.cz> References: <44335BF0.9020506@post.cz> Message-ID: I see that you are drawing a 9x9 grid of buttons to make your sudoku game. BUT, sudoku is in fact composed of a grid of 3x3 boxes, each of which contains a 3x3 grid of buttons. Isn't that right? my suggestion would be to use the grid method to place 3x3 frames, each of which can have a solid, thick border. Then inside those frames you can place your buttons. cheers s On 4/4/06, Pavel Kosina wrote: > I would like to ask for bright and simple idea how to draw thicker lines > between each 3 fields in this grid. Its about sudoku so the slines > should be there 4: 2 horizontaly a 2 vertikaly and maybe one around. > Some idea is already present with me but its quite complicated. > > > from Tkinter import * > > root=Tk() > size=2 > > for i in range(81): > _row, _column=divmod(i,9) > butt=Button(root, text=str(i), height=size, width=size*2, relief=RAISED) > butt.grid(row=_row, column=_column) > > > root.title("sudoku") > root.mainloop() > > Thank you > > -- > Pavel Kosina > > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss at python.org > http://mail.python.org/mailman/listinfo/tkinter-discuss > -- Stewart Midwinter stewart at midwinter.ca stewart.midwinter at gmail.com Skype, GoogleTalk, iChatAV, MSN, Yahoo: midtoad AIM:midtoad1 From klappnase at web.de Wed Apr 5 12:21:33 2006 From: klappnase at web.de (Michael Lange) Date: Wed, 5 Apr 2006 12:21:33 +0200 Subject: [Tkinter-discuss] canvas binding In-Reply-To: <3751619.post@talk.nabble.com> References: <3751619.post@talk.nabble.com> Message-ID: <20060405122133.223533a6.klappnase@web.de> On Tue, 4 Apr 2006 12:48:02 -0700 (PDT) fxe wrote: > > Hi, > Is it possible to have a both a rectangle and an oval drawn on the same > canvas yet only have bindings work on the rectangle. I would think it is > possible but I seem to be having a big problem with this. > -- Hi, what exactly do you want to achieve and what is the problem? It would be easier to figure out a solution if we knew the problem... Michael From geon at post.cz Sat Apr 8 19:10:54 2006 From: geon at post.cz (Pavel Kosina) Date: Sat, 08 Apr 2006 19:10:54 +0200 Subject: [Tkinter-discuss] toplevel on top Message-ID: <4437EE9E.1050005@post.cz> How to make Toplevel window (with some options to be set in it) to stay really on top unless its button OK (destroy) is pressed? In other words - its parent couldnt be activated. Thank you -- Pavel Kosina From klappnase at web.de Sat Apr 8 23:54:44 2006 From: klappnase at web.de (Michael Lange) Date: Sat, 8 Apr 2006 23:54:44 +0200 Subject: [Tkinter-discuss] toplevel on top In-Reply-To: <4437EE9E.1050005@post.cz> References: <4437EE9E.1050005@post.cz> Message-ID: <20060408235444.4d5abc46.klappnase@web.de> On Sat, 08 Apr 2006 19:10:54 +0200 Pavel Kosina wrote: > How to make Toplevel window (with some options to be set in it) to stay > really on top unless its button OK (destroy) is pressed? In other words > - its parent couldnt be activated. > Hi Pavel, you need to call the Toplevel's transient() method: >>> from Tkinter import * >>> r=Tk() >>> t=Toplevel(r) >>> t.transient(r) HTH Michael From geon at post.cz Sun Apr 9 07:41:25 2006 From: geon at post.cz (Pavel Kosina) Date: Sun, 09 Apr 2006 07:41:25 +0200 Subject: [Tkinter-discuss] toplevel on top In-Reply-To: <20060408235444.4d5abc46.klappnase@web.de> References: <4437EE9E.1050005@post.cz> <20060408235444.4d5abc46.klappnase@web.de> Message-ID: <44389E85.50005@post.cz> Michael Lange napsal(a): >> How to make Toplevel window (with some options to be set in it) to stay >> really on top unless its button OK (destroy) is pressed? In other words >> - its parent couldnt be activated. >> >> > > Hi Pavel, > > you need to call the Toplevel's transient() method: > Hi Michael, I am afraid it doesnt work, at least as I can understand it. I still can activate the root window. from Tkinter import * def OK(): top=Toplevel(root) top.transient(root) top.focus() helpText=Label(top,text="Help") helpText.pack() top.mainloop() root=Tk() helpButton=Button(text="Help", command=OK) helpButton.pack() root.mainloop() -- (w2000, py2.4) Pavel Kosina -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060409/36ae7c1e/attachment.html From klappnase at web.de Mon Apr 10 11:40:57 2006 From: klappnase at web.de (Michael Lange) Date: Mon, 10 Apr 2006 11:40:57 +0200 Subject: [Tkinter-discuss] toplevel on top In-Reply-To: <44389E85.50005@post.cz> References: <4437EE9E.1050005@post.cz> <20060408235444.4d5abc46.klappnase@web.de> <44389E85.50005@post.cz> Message-ID: <20060410114057.286b35c3.klappnase@web.de> On Sun, 09 Apr 2006 07:41:25 +0200 Pavel Kosina wrote: > > I am afraid it doesnt work, at least as I can understand it. I still can > activate the root window. > > from Tkinter import * > > def OK(): > top=Toplevel(root) > top.transient(root) > top.focus() > helpText=Label(top,text="Help") > helpText.pack() > top.mainloop() > > > root=Tk() > helpButton=Button(text="Help", command=OK) > helpButton.pack() > > root.mainloop() > Hi Pavel, transient() only makes the Toplevel stay on top of the root window, if you do not want the root window to receive any events you need to call grab_set(), too: top.transient(root) top.grab_set() HTH Michael From williams13 at llnl.gov Mon Apr 10 14:16:57 2006 From: williams13 at llnl.gov (Dean N. Williams) Date: Mon, 10 Apr 2006 05:16:57 -0700 Subject: [Tkinter-discuss] Combining Tcl/Tck widgets with a Xll Graphics window Message-ID: <443A4CB9.2030407@llnl.gov> Dear Tkinter and Tcl/Tk community, I am a Tkinter/Pmw user and have a general question. Is it possible to combine Tcl/Tk widgets with a X11 graphics window? Please see the attached TIFF for the example. If this possible, then is there any example code(s) for doing this? Following the example TIFF, I would like to have a Tkinter/Pmw menu bar above a X11 graphics window. It was suggested from the Pwm community that I e-mail the Tcl/Tk and Tkinter community for instructions on how to do what is needed for my application. Thanks in advance for any advice. Best regards, Dean P.S. "Please send your response to 'williams13 at llnl.gov'." From drh at hwaci.com Mon Apr 10 15:55:35 2006 From: drh at hwaci.com (drh at hwaci.com) Date: Mon, 10 Apr 2006 09:55:35 -0400 Subject: [Tkinter-discuss] [TCLCORE] Combining Tcl/Tck widgets with a Xll Graphics window In-Reply-To: <443A4CB9.2030407@llnl.gov> References: <443A4CB9.2030407@llnl.gov> Message-ID: <2453836.0797657278393962389317423667025309554535954143@hwaci.com> "Dean N. Williams" wrote: > Dear Tkinter and Tcl/Tk community, > > I am a Tkinter/Pmw user and have a general question. Is it possible to > combine Tcl/Tk widgets with a X11 graphics window? Please see the > attached TIFF for the example. The attachment has be copied to http://www.hwaci.com/misc/X-Window_in_PMW_frame.gif > If this possible, then is there any > example code(s) for doing this? Following the example TIFF, I would like > to have a Tkinter/Pmw menu bar above a X11 graphics window. It was > suggested from the Pwm community that I e-mail the Tcl/Tk and Tkinter > community for instructions on how to do what is needed for my application. > > Thanks in advance for any advice. > From jepler at unpythonic.net Tue Apr 11 14:31:10 2006 From: jepler at unpythonic.net (Jeff Epler) Date: Tue, 11 Apr 2006 07:31:10 -0500 Subject: [Tkinter-discuss] Combining Tcl/Tck widgets with a Xll Graphics window In-Reply-To: <443A4CB9.2030407@llnl.gov> References: <443A4CB9.2030407@llnl.gov> Message-ID: <20060411123110.GF27929@unpythonic.net> The "frame" widget has this option (from the tk manpage): Command-Line Name:-container Database Name: container Database Class: Container The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate win? dow manager protocols for things like geometry requests. The window should not have any children of its own in this applica? tion. This option may not be changed with the configure widget command. However, actually using this option seems to lead to focus-related headaches. Anyhow, here's a program that embeds an ImageMagick "display" into a Tk frame: #----------------------------------------------------------------------- import Tkinter, sys, os t = Tkinter.Tk() b = Tkinter.Button(text="quit", command=t.destroy) f = Tkinter.Frame(container=True, width=300, height=300, bg="") f.pack(side="top") b.pack(side="top") os.spawnvp(os.P_NOWAIT, 'display', ['display', '-window', hex(f.winfo_id()), '-window_group', hex(f.winfo_id()), sys.argv[1]]) t.mainloop() #----------------------------------------------------------------------- Jeff From blenderkid at web.de Tue Apr 11 11:15:24 2006 From: blenderkid at web.de (Jan Filip Tristan) Date: Tue, 11 Apr 2006 11:15:24 +0200 Subject: [Tkinter-discuss] optionmenu question Message-ID: Hello, I have got a problem.I've got a List and I want to have everything in this List as an own OptionMenu piece. TIA Filip From stewart.midwinter at gmail.com Tue Apr 11 17:06:33 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue, 11 Apr 2006 09:06:33 -0600 Subject: [Tkinter-discuss] optionmenu question In-Reply-To: References: Message-ID: On 4/11/06, Jan Filip Tristan wrote: > Hello, > I have got a problem.I've got a List and I want to have everything in this > List as an own OptionMenu piece. from Tkinter import * import Pmw root=Tk() Pmw.initialise() var = StringVar() var.set('Quanitity Surveyor') opt_menu = Pmw.OptionMenu(root,labelpos=W, label_text='Choose Profession', menubutton_textvariable=var, items=('Stockbrocker','Quantity Surveyor','Church Warden','BRM'), menubutton_width = 16) opt_menu.pack(anchor=W, padx=20, pady=30) root.mainloop() S From alexci at gmx.net Tue Apr 11 18:02:37 2006 From: alexci at gmx.net (Aleksandar Cikota) Date: Tue, 11 Apr 2006 18:02:37 +0200 (Central European Daylight Time) Subject: [Tkinter-discuss] Refresh loop Message-ID: <443BD31D.000005.03768@CIKOTA-TM4U7QQ2> Hello, I'm writing a software for our future robotic telescope in Python and started to make the GUI. I'm beginner in Tkiner and have a easy question. How to refresh this loop (and print the time) every second? Here the code: from Tkinter import * import win32com.client Scope = win32com.client.dynamic.Dispatch('ScopeSim.Telescope') root=Tk() Label(root, text=Scope.SiderealTime).grid(row=0, sticky=W) root.mainloop() ----- Scope.SiderealTime is LST from a telescope simulator, but it is only an exemple. You can also use system time for explaining. Thank You! Regards, Aleksandar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060411/00929d52/attachment.htm From klappnase at web.de Tue Apr 11 18:16:08 2006 From: klappnase at web.de (Michael Lange) Date: Tue, 11 Apr 2006 18:16:08 +0200 Subject: [Tkinter-discuss] optionmenu question In-Reply-To: References: Message-ID: <20060411181608.087f40b7.klappnase@web.de> On Tue, 11 Apr 2006 09:06:33 -0600 "Stewart Midwinter" wrote: > On 4/11/06, Jan Filip Tristan wrote: > > Hello, > > I have got a problem.I've got a List and I want to have everything in this > > List as an own OptionMenu piece. > > from Tkinter import * > import Pmw > root=Tk() > Pmw.initialise() > var = StringVar() > var.set('Quanitity Surveyor') > opt_menu = Pmw.OptionMenu(root,labelpos=W, > label_text='Choose Profession', > menubutton_textvariable=var, > items=('Stockbrocker','Quantity Surveyor','Church Warden','BRM'), > menubutton_width = 16) > opt_menu.pack(anchor=W, padx=20, pady=30) > root.mainloop() > Or in plain Tkinter: >>> from Tkinter import * >>> fruits = ['apple', 'banana', 'cherry', 'strawberry'] >>> root = Tk() >>> s = StringVar() >>> s.set('banana') >>> o = OptionMenu(root, s, *fruits) >>> o.pack() Michael From klappnase at web.de Tue Apr 11 18:27:44 2006 From: klappnase at web.de (Michael Lange) Date: Tue, 11 Apr 2006 18:27:44 +0200 Subject: [Tkinter-discuss] Refresh loop In-Reply-To: <443BD31D.000005.03768@CIKOTA-TM4U7QQ2> References: <443BD31D.000005.03768@CIKOTA-TM4U7QQ2> Message-ID: <20060411182744.757d28f7.klappnase@web.de> On Tue, 11 Apr 2006 18:02:37 +0200 (Central European Daylight Time) "Aleksandar Cikota" wrote: > Hello, > > I'm writing a software for our future robotic telescope in Python and > started to make the GUI. > I'm beginner in Tkiner and have a easy question. How to refresh this loop > (and print the time) every > second? > > > > Here the code: > > > from Tkinter import * > import win32com.client > Scope = win32com.client.dynamic.Dispatch('ScopeSim.Telescope') > root=Tk() > > Label(root, text=Scope.SiderealTime).grid(row=0, sticky=W) > > root.mainloop() > > > ----- > Scope.SiderealTime is LST from a telescope simulator, but it is only an > exemple. You can also use system time for explaining. > Hi Aleksandar, the easiest way is to define a callback and use after() to periodically invoke it: from Tkinter import * import win32com.client Scope = win32com.client.dynamic.Dispatch('ScopeSim.Telescope') root=Tk() label = Label(root, text=Scope.SiderealTime) label.grid(row=0, sticky=W) def update_label(): label.config(text=Scope.SiderealTime) label.after(1000, update_label) label.after(1000, update_label) The time after which the next call to update_label() occurs (1000 ms here) is not exact however, so the interval to be used depends on your needs; I have used an interval of 250 ms for a "digital clock" widget that displays full seconds and it looks good enough to me, but if you look close you may find that some "second" takes longer than the others. HTH Michael From tkinter-user at gbeckers.nl Thu Apr 13 00:16:56 2006 From: tkinter-user at gbeckers.nl (gabriel) Date: Thu, 13 Apr 2006 00:16:56 +0200 Subject: [Tkinter-discuss] create and delete canvas items / memory Message-ID: <200604130016.57243.tkinter-user@gbeckers.nl> Hi, I am writing an application where I create and delete a lot of canvas items. I use Snack ( http://www.speech.kth.se/snack/ ) to create the canvas items, which are spectrograms of short sounds. Each time I delete all canvas items (spectrograms) and recreate the very same series of items, memory usage is higher than it was before, while I assume it should be the same. Doing this many times creates memory problems. I do not bind anything to the items. Deleting the items does reduce the memory consumption for a large part, but apparently not completely. Destroying the canvas, and then make a new one does not solve the problem. I use python 2.4.2 on Ubuntu Linux (Breezy). Snack 2.2.10. Any ideas about where the memory of deleted canvas items is going would be very much appreciated. And a solution even more! Thanks, Gabriel From jepler at unpythonic.net Thu Apr 13 02:52:07 2006 From: jepler at unpythonic.net (Jeff Epler) Date: Wed, 12 Apr 2006 19:52:07 -0500 Subject: [Tkinter-discuss] create and delete canvas items / memory In-Reply-To: <200604130016.57243.tkinter-user@gbeckers.nl> References: <200604130016.57243.tkinter-user@gbeckers.nl> Message-ID: <20060413005206.GA11045@unpythonic.net> I've never used snack. However, I wrote a program which repeatedly creates and then destroyes 1000 "line" objects on a canvas: #----------------------------------------------------------------------- def main(): import Tkinter t = Tkinter.Canvas() t.pack() while 1: for i in range(1000): t.create_line((0, i, i, 100)) t.update() t.delete("all") main() #----------------------------------------------------------------------- The "VIRT" column in top stabalizes at 18976. I'm using the same system as you -- Ubuntu Breezy. IMO this points a finger at something inside snack. Jeff From tkinter-user at gbeckers.nl Thu Apr 13 08:40:21 2006 From: tkinter-user at gbeckers.nl (gabriel) Date: Thu, 13 Apr 2006 08:40:21 +0200 Subject: [Tkinter-discuss] create and delete canvas items / memory In-Reply-To: <20060413005206.GA11045@unpythonic.net> References: <200604130016.57243.tkinter-user@gbeckers.nl> <20060413005206.GA11045@unpythonic.net> Message-ID: <200604130840.21463.tkinter-user@gbeckers.nl> Thanks Jeff, for the reply. Your program stabilizes around the same value on my machine, so indeed it is likely something in Snack. Too bad, I really like this toolbox. I'll try to contact the author, and perhaps in the meantime look for an other solution. All best, Gabriel From blenderkid at web.de Fri Apr 14 12:23:19 2006 From: blenderkid at web.de (Jan Filip Tristan) Date: Fri, 14 Apr 2006 12:23:19 +0200 Subject: [Tkinter-discuss] frame fixed size Message-ID: Hi, I've got a easy problem, I want to have a fixed size of a grided Frameobject. TIA, Filip From jepler at unpythonic.net Fri Apr 14 14:05:52 2006 From: jepler at unpythonic.net (Jeff Epler) Date: Fri, 14 Apr 2006 07:05:52 -0500 Subject: [Tkinter-discuss] frame fixed size In-Reply-To: References: Message-ID: <20060414120552.GB19540@unpythonic.net> If you want a frame to have a fixed size, regardless of its contents, then you have to make one of the following method calls: f.pack_propagate(False) or f.grid_propagate(False) depending on whether its contents are positioned with .pack() or with .grid(). The normal behavior (propagate is True) causes the frame to request a size that reflects what the children request. When propagate is false, the frame uses its width= and height= as the requested size. Jeff From shussai2 at yahoo.com Mon Apr 17 19:37:32 2006 From: shussai2 at yahoo.com (Sajjad Hussain) Date: Mon, 17 Apr 2006 10:37:32 -0700 (PDT) Subject: [Tkinter-discuss] Problem with PSDraw in PIL when trying to print Message-ID: <20060417173732.85361.qmail@web36802.mail.mud.yahoo.com> Hi, I am trying to follow the Postscript print example in PIL. So I am using PSDraw to create a new ps file from a jpeg. I have ghostview installed, so I can view the resulting ps file (when it is produced successfully). Example from PIL Manual: import Image, PSDraw im = Image.open('lena.jpg').convert('L') box = (1*72, 2*72, 7*72, 10*72) outfp = open('lena.ps','w') ps = PSDraw.PSDraw(outfp) ps.begin_document() ps.image(box,im,72) ps.rectangle(box) ps.end_document() Now when I try to open up the lena.ps (that should contain the lena.jpg) in ghostview, I get Error: undefined gsize. However when I change the gsize to gsave in the lena.ps, the file loads up. Snippet of the actual code is show below: %%EndProlog gsize ------------------> change this to gsave 240.000000 384.000000 translate 0.960000 0.960000 scale gsave I don't know why it is happening. Can you please tell me another solution instead of changing a line manually. I just need to print a jpeg file. Is there any way else to do this. So basically I have an image in a folder, I open it and send it to a printer. Please let me know if you guys know anything. Regards, Sajjad __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From fredrik at pythonware.com Mon Apr 17 20:23:10 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon, 17 Apr 2006 20:23:10 +0200 Subject: [Tkinter-discuss] Problem with PSDraw in PIL when trying to print References: <20060417173732.85361.qmail@web36802.mail.mud.yahoo.com> Message-ID: Sajjad Hussain wrote: > %%EndProlog > gsize ------------------> change this to gsave > 240.000000 384.000000 translate > 0.960000 0.960000 scale > gsave > > > I don't know why it is happening. Can you please tell > me another solution instead of changing a line > manually. it's a known bug in PIL 1.1.4 and earlier. I suggest upgrading to 1.1.5. From K.Wong at lboro.ac.uk Tue Apr 18 15:11:17 2006 From: K.Wong at lboro.ac.uk (Casey Wong Kam Shun) Date: Tue, 18 Apr 2006 14:11:17 +0100 Subject: [Tkinter-discuss] tkdnd installation Message-ID: <1145365877.4444e57527741@staff-webmail.lboro.ac.uk> Hi, I am learning how to use tkdnd and would appreciate if someone could let me know how to install tkdnd? I know there is installation instruction but it is not clear for a novice like me. For example what should I do with the libtkdnd.dll ( and the binary one-- libtkdnd10.dll) file? Many thanks regards Casey Wong From klappnase at web.de Thu Apr 20 11:02:21 2006 From: klappnase at web.de (Michael Lange) Date: Thu, 20 Apr 2006 11:02:21 +0200 Subject: [Tkinter-discuss] tkdnd installation In-Reply-To: <1145365877.4444e57527741@staff-webmail.lboro.ac.uk> References: <1145365877.4444e57527741@staff-webmail.lboro.ac.uk> Message-ID: <20060420110221.59f3a6db.klappnase@web.de> On Tue, 18 Apr 2006 14:11:17 +0100 Casey Wong Kam Shun wrote: > Hi, > > I am learning how to use tkdnd and would appreciate if someone could let me > know how to install tkdnd? I know there is installation instruction but it > is not clear for a novice like me. For example what should I do with the > libtkdnd.dll ( and the binary one-- libtkdnd10.dll) file? Many thanks > Hi Casey, I have not used the windows version yet, but I think you should copy the folder that contains the dlls into your tcl folder, so that you get something like C:\Python24\tcl\tkdnd1.0\libtkdnd10.dll HTH Michael From K.Wong at lboro.ac.uk Fri Apr 21 09:41:19 2006 From: K.Wong at lboro.ac.uk (Casey Wong Kam Shun) Date: Fri, 21 Apr 2006 08:41:19 +0100 Subject: [Tkinter-discuss] question regarding TkinterDnD and tkDnD Message-ID: <1145605279.44488c9f62c21@staff-webmail.lboro.ac.uk> Hi Michael, First of all thanks for your reply in the Tkinter-discuss forum. I am using the TkinterDnD for a project of mine. I have the newest tkdnd installed in the newest Tcl\lib folder (activestate Tcl, it is installed in c:\Tcl), and I have followed the instruction to copy the TkinterDnD folder into the Python*\lib\site-packages folder. I am using Xp pro sp2 and python 2.2.3. I have also put the tkdnd unzipped folder into the python22\tcl folder. I would appreciate it if you could let me know what could have caused the following error when I run the dnddemo.py: TclError Exception in Tk callback Function: (type: ) Args: () Traceback (innermost last): File "C:\Program Files\Leo\extensions\Pmw\Pmw_1_2\lib\PmwBase.py", line 1752, in __call__ return apply(self.func, args) File "C:\Program Files\Leo\plugins\mod_scripting.py", line 333, in runScriptCommand c.executeScript(c.currentPosition(),useSelectedText=True,silent=True) File "C:\Program Files\Leo\src\leoCommands.py", line 1316, in executeScript exec script in d File "", line 8, in ? None File "C:\Program Files\Visual Components\Python 2.2\Lib\site-packages\TkinterDnD\TkinterDnD.py", line 352, in __init__ self.TkdndVersion = _require(self) File "C:\Program Files\Visual Components\Python 2.2\Lib\site-packages\TkinterDnD\TkinterDnD.py", line 333, in _require tkdndver = tkroot.tk.call('package', 'require', 'tkdnd') TclError: can't find package tkdnd Many thanks for your help best regards Casey Wong From klappnase at web.de Fri Apr 21 12:31:55 2006 From: klappnase at web.de (Michael Lange) Date: Fri, 21 Apr 2006 12:31:55 +0200 Subject: [Tkinter-discuss] question regarding TkinterDnD and tkDnD In-Reply-To: <1145605279.44488c9f62c21@staff-webmail.lboro.ac.uk> References: <1145605279.44488c9f62c21@staff-webmail.lboro.ac.uk> Message-ID: <20060421123155.34983dda.klappnase@web.de> On Fri, 21 Apr 2006 08:41:19 +0100 Casey Wong Kam Shun wrote: > First of all thanks for your reply in the Tkinter-discuss forum. I am using > the TkinterDnD for a project of mine. I have the newest tkdnd > installed in the newest Tcl\lib folder (activestate Tcl, it is installed in > c:\Tcl), and I have followed the instruction to copy the TkinterDnD folder > into the Python*\lib\site-packages folder. I am using Xp pro sp2 and > python 2.2.3. I have also put the tkdnd unzipped folder into the > python22\tcl folder. I would appreciate it if you could let me know what > could have caused the following error when I run the dnddemo.py: > > > TclError Exception in Tk callback > Function: (type: 'function'>) > Args: () > Traceback (innermost last): > File "C:\Program Files\Leo\extensions\Pmw\Pmw_1_2\lib\PmwBase.py", line > 1752, in __call__ > return apply(self.func, args) > File "C:\Program Files\Leo\plugins\mod_scripting.py", line 333, in > runScriptCommand > c.executeScript(c.currentPosition(),useSelectedText=True,silent=True) > File "C:\Program Files\Leo\src\leoCommands.py", line 1316, in > executeScript > exec script in d > File "", line 8, in ? > None > File "C:\Program Files\Visual Components\Python > 2.2\Lib\site-packages\TkinterDnD\TkinterDnD.py", line 352, in __init__ > self.TkdndVersion = _require(self) > File "C:\Program Files\Visual Components\Python > 2.2\Lib\site-packages\TkinterDnD\TkinterDnD.py", line 333, in _require > tkdndver = tkroot.tk.call('package', 'require', 'tkdnd') > TclError: can't find package tkdnd > Hi Casey, this is obviously a Tcl problem, Tcl still cannot find tkdnd. I just tried and downloaded libtkdnd10.zip from sourceforge, which seems to be the latest windows binary, and it did not work for me either (not sure if this is the same as you have, it contains only a single dll file). I have also tried an older version (tkdnd-1.0a2) which "works" partially, i.e. the demo windows appear, however drag and drop does not work. I think the difference is that this one contains a pkgIndex.tcl file which was missing from the other release. Maybe the problem here was that it is compiled against a different version of Tk than mine (on linux however the precompiled binary works well with different version of Tcl/Tk). A "desperate" try might be to install snackAmp () which comes with tkdnd (at least the linux version) and see if you can copy the tkdnd libs from there into your python installation (I have not tried this though). Maybe one of the Tcl gurus here knows more than me. If no one from tkinter-discuss can help maybe you should contact the author or try on a tcl forum. Sorry Michael From v_noroozi64 at yahoo.com Sat Apr 22 14:58:32 2006 From: v_noroozi64 at yahoo.com (Vahid Noroozi) Date: Sat, 22 Apr 2006 05:58:32 -0700 (PDT) Subject: [Tkinter-discuss] select.poll() Message-ID: <20060422125832.56852.qmail@web31609.mail.mud.yahoo.com> hello, in windows python select module doesn't suppport poll() i wanted to know if it is possible to implement poll function by using select.select() function in windows. --------------------------------- Yahoo! Mail goes everywhere you do. Get it on your phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060422/53205e9d/attachment.htm From fredrik at pythonware.com Sat Apr 22 15:12:16 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Sat, 22 Apr 2006 15:12:16 +0200 Subject: [Tkinter-discuss] select.poll() References: <20060422125832.56852.qmail@web31609.mail.mud.yahoo.com> Message-ID: Vahid Noroozi wrote: > in windows python select module doesn't suppport poll() > i wanted to know if it is possible to implement poll function > by using select.select() function in windows. this is a Tkinter-specific list, and general Python questions don't really belong here. I suggest that you repost it to a general Python support list; see http://www.python.org/about/help/ http://www.python.org/community/lists/#clp From geon at post.cz Mon Apr 24 18:24:38 2006 From: geon at post.cz (Pavel Kosina) Date: Mon, 24 Apr 2006 18:24:38 +0200 Subject: [Tkinter-discuss] buttonpress Message-ID: <444CFBC6.9030602@post.cz> Hi, I am not sure, if I do understand perfectly what is written in http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm : When you press down a mouse button over a widget, Tkinter will automatically "grab" the mouse pointer, and mouse events will then be sent to the current widget as long as the mouse button is held down. Seems to me that mouse event is sent to to widget only once, not all time untill I release the button. The callback function is proceed only once with me. Thank you -- Pavel Kosina From camfarnell at cogeco.ca Mon Apr 24 19:29:04 2006 From: camfarnell at cogeco.ca (Cam) Date: Mon, 24 Apr 2006 13:29:04 -0400 Subject: [Tkinter-discuss] Rapyd-Tk release 0.0.0 Message-ID: <444D0AE0.1060309@cogeco.ca> Hello Tkinter fans, The first release of Rapyd-Tk, an open source, graphical design environment for use with Python and Tkinter is now available at: http://home.cogeco.ca/~rapyd Rapyd-Tk is licensed under the GPL version 2. Please note that this is an *alpha* release (which around here at least means a pre-pre-release of brand new code). Although hundreds of hours of testing have gone into this there are certainly bugs remaining, particularly as it is used on lots of systems. I only have Linux boxes so all testing had been done on Linux although I believe it should work on that other operating system as well. Have fun :) Cam Farnell From stewart.midwinter at gmail.com Mon Apr 24 19:45:06 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Mon, 24 Apr 2006 11:45:06 -0600 Subject: [Tkinter-discuss] Rapyd-Tk release 0.0.0 In-Reply-To: <444D0AE0.1060309@cogeco.ca> References: <444D0AE0.1060309@cogeco.ca> Message-ID: Finally, a GUI designer for Tkinter and Pmw! this is huge - thanks so much for taking on the challenge. I've only looked at the screenshots so far, but this should definitely make it easier for beginners to get started. cheers Stewart in Calgary From jepler at unpythonic.net Mon Apr 24 21:42:26 2006 From: jepler at unpythonic.net (Jeff Epler) Date: Mon, 24 Apr 2006 14:42:26 -0500 Subject: [Tkinter-discuss] buttonpress In-Reply-To: <444CFBC6.9030602@post.cz> References: <444CFBC6.9030602@post.cz> Message-ID: <20060424194225.GA16935@unpythonic.net> Consider the following program: def print_event(evt): print "Event at", evt.x, evt.y from Tkinter import * b = Button() b.pack() b.bind("", print_event) b.mainloop() Click inside the button, then move the mouse around, including outside the area of the button. You'll continue to see the message "Event at ..." printed as long as the mouse continues moving, until you release the button. Jeff From stewart.midwinter at gmail.com Mon Apr 24 22:43:15 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Mon, 24 Apr 2006 14:43:15 -0600 Subject: [Tkinter-discuss] buttonpress In-Reply-To: <20060424194225.GA16935@unpythonic.net> References: <444CFBC6.9030602@post.cz> <20060424194225.GA16935@unpythonic.net> Message-ID: On 4/24/06, Jeff Epler wrote: > Click inside the button, then move the mouse around, including outside the area > of the button. You'll continue to see the message "Event at ..." printed as > long as the mouse continues moving, until you release the button. heh, that keeps recording coordinates even when you move entirely to the far end of the desktop. Handy feature for telling if you are within bounds on a graphic app for instance. cheers S From geon at post.cz Tue Apr 25 18:41:27 2006 From: geon at post.cz (Pavel Kosina) Date: Tue, 25 Apr 2006 18:41:27 +0200 Subject: [Tkinter-discuss] buttonpress In-Reply-To: References: <444CFBC6.9030602@post.cz> <20060424194225.GA16935@unpythonic.net> Message-ID: <444E5137.2060805@post.cz> Stewart Midwinter napsal(a): > On 4/24/06, Jeff Epler wrote: > >> Click inside the button, then move the mouse around, including outside the area >> of the button. You'll continue to see the message "Event at ..." printed as >> long as the mouse continues moving, until you release the button. >> > > heh, that keeps recording coordinates even when you move entirely to > the far end of the desktop. Handy feature for telling if you are > within bounds on a graphic app for instance. > > Unfortunately not with me. This piece of code doesnt work as you wrote and/or is described in the link I sent before. (it is about ..) : from Tkinter import * root = Tk() def callback(event): frame.focus_set() print "clicked at", event.x, event.y frame = Frame(root, width=100, height=100) frame.bind("", callback) frame.pack() root.mainloop() -- Pavel Kosina -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060425/a0277a67/attachment.html From stewart.midwinter at gmail.com Tue Apr 25 18:57:44 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue, 25 Apr 2006 10:57:44 -0600 Subject: [Tkinter-discuss] buttonpress In-Reply-To: <444E5137.2060805@post.cz> References: <444CFBC6.9030602@post.cz> <20060424194225.GA16935@unpythonic.net> <444E5137.2060805@post.cz> Message-ID: Pavel, what operating system are you on, and what version of Python, and what version of Tcl/Tk? Also note that to see the code work, you need to click on the button itself, which might be a bit hard as it is quite narrow. To make the button wider, give it some text. Also note that the events will be printed in a console window, not in the application itself. Below a version of Jeff's test app that shows the events in the application itself, in a label. On 4/25/06, Pavel Kosina wrote: > Unfortunately not with me. This piece of code doesnt work as you wrote > and/or is described in the link I sent before. (it is about ..) --- #mouseevent.py from Tkinter import * root = Tk() myEvent = StringVar() myEvent.set('no event yet') def print_event(evt): msg = "Event at", evt.x, evt.y print msg myEvent.set(msg) b = Button(root, text="Press here!") b.pack() l = Label(root, textvariable=myEvent,text=myEvent.get() ) l.pack() b.bind("", print_event) b.mainloop() From geon at post.cz Tue Apr 25 19:09:49 2006 From: geon at post.cz (geon) Date: Tue, 25 Apr 2006 19:09:49 +0200 Subject: [Tkinter-discuss] buttonpress In-Reply-To: References: <444CFBC6.9030602@post.cz> <20060424194225.GA16935@unpythonic.net> <444E5137.2060805@post.cz> Message-ID: <444E57DD.7050801@post.cz> Stewart Midwinter napsal(a): > Pavel, what operating system are you on, and what version of Python, > and what version of Tcl/Tk? > > w2000, py2.4, tcl that shipped with py > Also note that to see the code work, you need to click on the button > itself, which might be a bit hard as it is quite narrow. To make the > button wider, give it some text. Also note that the events will be > printed in a console window, not in the application itself. > yes, the problem is as I had in mind - you code is about but my code (and that link http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm ) is about event.... -- Pavel Kosina From fredrik at pythonware.com Tue Apr 25 21:09:14 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue, 25 Apr 2006 21:09:14 +0200 Subject: [Tkinter-discuss] buttonpress References: <444CFBC6.9030602@post.cz> <20060424194225.GA16935@unpythonic.net> <444E5137.2060805@post.cz> <444E57DD.7050801@post.cz> Message-ID: "geon" wrote: > yes, the problem is as I had in mind - you code is about > but my code (and that link > http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm ) is > about event.... no, it's not. it says that "mouse events" are grabbed by the widget for as long as the button is held down, not that you'll get more click events without clicking. I've changed the text to make this more obvious. From esj at harvee.org Thu Apr 27 00:48:10 2006 From: esj at harvee.org (Eric S. Johansson) Date: Wed, 26 Apr 2006 18:48:10 -0400 Subject: [Tkinter-discuss] active icons with drag-and-drop Message-ID: I'm trying a user interface experiment. the first step involves dragging and dropping from one application onto an icon. subsequent steps will involve playing with the clipboard, icon changes, single click, double click as well as press and hold for a menu. is this something one can do with tkinter without a large amount of complexity or would I be better off looking at other toolkits including native kits? many thanks ---eric From klappnase at web.de Thu Apr 27 11:27:58 2006 From: klappnase at web.de (Michael Lange) Date: Thu, 27 Apr 2006 11:27:58 +0200 Subject: [Tkinter-discuss] active icons with drag-and-drop In-Reply-To: References: Message-ID: <20060427112758.092efc8f.klappnase@web.de> On Wed, 26 Apr 2006 18:48:10 -0400 "Eric S. Johansson" wrote: > I'm trying a user interface experiment. the first step involves > dragging and dropping from one application onto an icon. subsequent > steps will involve playing with the clipboard, icon changes, single > click, double click as well as press and hold for a menu. > > is this something one can do with tkinter without a large amount of > complexity or would I be better off looking at other toolkits including > native kits? > Hi Eric, there is no built-in drag and drop support in Tk (I assume you mean to drag e.g. a filename to an icon on the windows desktop). If you want to do so, you need the tkdnd extension for Tk (not to be confused with python's Tkdnd module), which adds native drag and drop support for windows and unix platforms: and its python wrapper : . Please note that the TkinterDnD module was written for tkdnd-1.0, not the brand new tkdnd-2, which appears to be incompatible with the older release. According to a message on it might work anyway, but I have not done any testing on this yet. Some recent postings on comp.lang.tcl say that tkdnd-2 seems to be better than tkdnd-1.0, so it might be worth a try. There are also some issues installing tkdnd-1.0 on windows, because of a missing pkgIndex.tcl file in the distribution, shows how to fix this. The other things you mentioned should not be too hard (though I am not really sure what you mean by "icon changes" and "press and hold for a menu"). Regards Michael From Ilknur.Ozturk at cabot.com.tr Fri Apr 28 12:01:27 2006 From: Ilknur.Ozturk at cabot.com.tr (Ilknur Ozturk) Date: Fri, 28 Apr 2006 13:01:27 +0300 Subject: [Tkinter-discuss] changing button functionality Message-ID: <79CD3DAD56583A4298D4941761CF687A411C4D@cabottrexch.cabot.local> I put a button (button1) and want that the user can change the function called when it is clicked. I planned such a way to realize this. The first click of it will open a new window and the user will enter a key in an entry. When he confirms it by pressing OK button, the button1 will be directed to a new function which gets the entry content as a parameter. Then the button1 will always call that function. If I can use if statement to determine the which function will be called when the button presses, it will be very helpful. Then I can call any function by checking the button's attributes with if statement. If it is not possible, how can I realize such an aim. If we can use if statement for button's command option, can you give me an example? Thanks, ilknur ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20060428/c50f724f/attachment.html From stewart.midwinter at gmail.com Fri Apr 28 15:25:34 2006 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Fri, 28 Apr 2006 07:25:34 -0600 Subject: [Tkinter-discuss] changing button functionality In-Reply-To: <79CD3DAD56583A4298D4941761CF687A411C4D@cabottrexch.cabot.local> References: <79CD3DAD56583A4298D4941761CF687A411C4D@cabottrexch.cabot.local> Message-ID: On 4/28/06, Ilknur Ozturk wrote: > If I can use if statement to determine the which function will be called > when the button presses, it will be very helpful. Then I can call any > function by checking the button's attributes with if statement. If it is not > possible, how can I realize such an aim. If we can use if statement for > button's command option, can you give me an example? Marhava, Ilknur-bey: In tkinter program, it will be helpful to think about states rather than conditions, since the GUI is event-driven. So instead of an if statement 'per se', think of telling the application whether you are in an initial state or a subsequent state. Here's a little app that accomplishes what you are after. The app also illustrates some elements of good Tkinter program design practice (at least, as far as I understand them!) :-) cheers, Stewart -------------- next part -------------- A non-text attachment was scrubbed... Name: buttonpress.py Type: text/x-python Size: 1101 bytes Desc: not available Url : http://mail.python.org/pipermail/tkinter-discuss/attachments/20060428/88c77459/attachment.py From esj at harvee.org Sun Apr 30 05:09:03 2006 From: esj at harvee.org (Eric S. Johansson) Date: Sat, 29 Apr 2006 23:09:03 -0400 Subject: [Tkinter-discuss] active icons with drag-and-drop In-Reply-To: <20060427112758.092efc8f.klappnase@web.de> References: <20060427112758.092efc8f.klappnase@web.de> Message-ID: <44542A4F.4000609@harvee.org> my apologies for the long delayed response. Michael Lange wrote: > there is no built-in drag and drop support in Tk (I assume you mean > to drag e.g. a filename to an icon on the windows desktop). If you > want to do so, you need the tkdnd extension for Tk (not to be > confused with python's Tkdnd module), which adds native drag and drop > support for windows and unix platforms: > and its python wrapper : > . your assumption is correct. I want to try to an icon on the desktop. It sounds like that may be tkinter is not the way to go and that I would be better off building my own framework (when I have copious spare time) since what I want to do is relatively simple. > The other things you mentioned should not be too hard (though I am > not really sure what you mean by "icon changes" and "press and hold > for a menu"). what I was interested in playing with was a user interface concept I call "transformative icons". Specifically, you can drag-and-drop data from one application to the icon, the icon attached program changes it into some other form and clicking the icon place at the data into the clipboard so you can paste it somewhere else. Other variants include pressing and holding the icon to display a menu of options of transformation or double-clicking to bring up menus for controlling properties for the default transformation. I see this tool as a way of making uncooperative applications cooperate. There are a series of data transformation tools available on different platforms but they count on both applications cooperating in using the same protocol and quite frankly, that just doesn't happen in the real world. this all came out of my trying to figure out how to return e-mail messages back to a remote anti-spam engine. Writing plug-ins for every e-mail client on the face of the planet just doesn't work. Hell, just writing plug-ins for Thunderbird is a crap shoot. Outlook is just plain impossible. So the bright idea was drag the message to an icon and have the icon act as a data sink redirecting the message to the anti-spam server. anyway, thanks for the assistance. ---eric