Re: [Tkinter-discuss] Tkinter Geometry Management and Other Basics

2009-07-25 Thread Alan Gauld
to the OP, yes you can definitely mix the manager provided you keep to one per container. I typically use pack to pack a set of frames into my top level app. But within each of the subframes I then use grid/pack as suits my needs, often (usually?) a mx of both in a single app. -- Alan Gauld Auth

Re: [Tkinter-discuss] Tkinter Geometry Management and Other Basics

2009-07-26 Thread ALAN GAULD
> > There is now a fourth, the form manager, as of Python 2.7/3.1... > > What is this "form manager" ? Probably not the one from Tix, since it > is has been in Python for more than 8 years. It could be the same, I didn't know Tix had a form manager. I only noticed it while reading the Whats

Re: [Tkinter-discuss] Tkinter Geometry Management and Other Basics

2009-07-26 Thread ALAN GAULD
> > It could be the same, I didn't know Tix had a form manager. > > I only noticed it while reading the Whats New stuff > > for Python 3.1/2.7. ISTR It was listed amongst the info about ttk. > > > > If that information is listed there then there is something wrong. But > I only see a short note

Re: [Tkinter-discuss] Python tutorial

2011-05-14 Thread Alan Gauld
th some clearer typography it has the makings of a good tutorial. -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] Button

2011-05-23 Thread Alan Gauld
splays progress (or at the very least a warning). The objective should be to habd control back to the event loop as fast as possible so you can respond to the next event - which might, after all, be a cancel operation! HTH, -- Alan Gauld Author of the Learn to Program web site http://w

Re: [Tkinter-discuss] Callbacks to classes

2011-05-23 Thread Alan Gauld
persistent actions are required. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] syntax highlighting

2011-05-23 Thread Alan Gauld
"Nemes Andrei" wrote Better yet, is there a nicer way to do syntax highlighting? Take a look at the IDLE source - it is all in Python/Tkinter and available in the standard distribution. It seems to handle syntax highlighting OK... HTH, -- Alan Gauld Author of the Learn to P

Re: [Tkinter-discuss] 回复: 回复: why tkinter do not quit?

2011-08-11 Thread Alan Gauld
On 10/08/11 04:14, 守株待兔 wrote: i am sitll confused,please see the following >>> def abc(): ... print "i am abc" ... return "i am not abc" ... >>> abc >>> abc() i am abc 'i am not abc' The first line is the print statement in the function. The second line is the return value of the function.

Re: [Tkinter-discuss] importing tk.W?

2014-04-20 Thread Alan Gauld
On 11/03/14 03:27, memilanuk wrote: appears I can use either a wildcard import, enclose it in quotes, or use explicit reference e.g. tk.W. My question is this: How / why does this make any sense, that an attribute (W) to an option (sticky=) would be imported at the same level as widgets themse

[Tkinter-discuss] Is this the right place for Tix questions?

2014-04-20 Thread Alan Gauld
I don't see a separate Tix group so is this a valid place to ask Tix questions? I've been trying to use some of the Tix widgets and running into issues, especially with tix.Grid formatting. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/ala

[Tkinter-discuss] Tix Grid question, was: Re: Is this the right place for Tix questions?

2014-04-21 Thread ALAN GAULD
rom the formatcmd function but that's  what I'm doing... Any pointers appreciated. And if anyone knows a decent book or  web site for Python Tix that would also be much appreciated.  I can get most things to work in Tix but the Grid has me beat  so far. Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos ___ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss

[Tkinter-discuss] How to enable/disable a menu?

2014-05-13 Thread Alan Gauld
I have an app with a tabbed notebook. I want to only enable one of the main menus when the appropriate tab is selected. When the tab is deselected I want to disable the menu again. I can't see any obvious properties in the Menu object. I can mess around with flags in the event handlers and change

Re: [Tkinter-discuss] How to enable/disable a menu?

2014-05-14 Thread ALAN GAULD
>You can disable the button or menu item the menu is associated with, and that >will disable the whole menu. Thats what I assumed but which proprerty disables >a menu - or any other widget for that matter?  I'm assuming its an inherited atttribute of some sort? Alan G

Re: [Tkinter-discuss] How to enable/disable a menu?

2014-05-14 Thread ALAN GAULD
Thanks Bryan,  I played around with that and its exactly what I needed. Thanks to all who sent comments.   Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos > > From: Bryan Oakley >

[Tkinter-discuss] divergent behaviour

2014-06-22 Thread Alan Gauld
I've observed a strange difference in the behaviour of one of my event handlers, I'm wondering if anyone knows the explanation. I have a form with a list box and a set of buttons. When you highlight a list item you can press the Edit button and it calls evEdit() which opens an edit dialog in the

Re: [Tkinter-discuss] divergent behaviour

2014-06-23 Thread Alan Gauld
On 23/06/14 10:00, Michael Lange wrote: is it possible to post only the evEdit() function? Without that I can only guess, maybe the use of event.widget there causes confusion? Is the parent window the Tk() window or another Toplevel()? The parent is the main Tk window. The evEdit doesn't use t

Re: [Tkinter-discuss] divergent behaviour

2014-06-23 Thread Alan Gauld
On 23/06/14 19:36, Michael Lange wrote: self.eventlist = tk.Listbox(self.history, width=45, font=('mono','10', '')) self.eventlist.bind('', self.eventSelect) self.eventlist.bind('',self.doEdit) ... self.editEvent = tk.Butto

Re: [Tkinter-discuss] divergent behaviour

2014-06-23 Thread Alan Gauld
On 24/06/14 00:27, Alan Gauld wrote: I cannot see anything that looks critical here, how do you calculate the Toplevel's coords in the MapEntry class? I don't, I just leave Tk to do its thing. Its a subclass of Fred's standard Dialog class with the body and apply method

Re: [Tkinter-discuss] divergent behaviour

2014-06-24 Thread Alan Gauld
On 24/06/14 17:56, Michael O'Donnell wrote: Hi Alan, Without seeing the code, Most of the related stuff is now posted under the thread with Michael Lange. are you aware that both single-click and double-click events are called when you double-click an item. No, that's good to know. But

Re: [Tkinter-discuss] divergent behaviour(complete example code)

2014-06-24 Thread Alan Gauld
On 24/06/14 16:34, Michael Lange wrote: Hmm, so the dialog toplevel window is a child of the Frame... I don't think that this should be a problem, but maybe you could try to make it a child of the Tk window? Tried it, no difference :-( Thanks for the suggestion though. PS. I'm about to post a

Re: [Tkinter-discuss] divergent behaviour(complete code)

2014-06-24 Thread Alan Gauld
On 22/06/14 23:18, Alan Gauld wrote: Does anyone know why double-click and button versions of the same method result in different locations? I'm assuming that somehow the dialog (TopLevel widget) sees the screen as its parent in one version but the original window as parent in the other -

Re: [Tkinter-discuss] divergent behaviour(complete code)

2014-06-24 Thread Alan Gauld
On 24/06/14 19:17, Michael Lange wrote: There is no difference in the position of the dialog window when I double-click the Label or push the button here on Debian wheezy, I tried with icewm, xfce, gnome3, lxde and awesome, maybe it is some oddity with your WM or the particular Tk version you us

Re: [Tkinter-discuss] TKinter and Python asyncio

2018-01-05 Thread Alan Gauld via Tkinter-discuss
On 19/12/17 23:40, c.bu...@posteo.jp wrote: > I need to download between 100 or 200 xml-like files from different > locations. More specific: I use "feedparser" to get rss/atom feeds. > The issue is probably not how many files you need but how many sites you need. If it is 1 file per site I'd def

Re: [Tkinter-discuss] horizontal line in Text

2020-01-23 Thread Alan Gauld via Tkinter-discuss
On 16/01/2020 13:14, Vasilis Vlachoudis wrote: > Hi all, > > is it possible to draw a horizontal line in the Text() widget, something > like the in html, extending all over the widget. Would a line of spaces with the underline turned on in the font work? If you use a monospace font the length sh

Re: [Tkinter-discuss] horizontal line in Text

2020-01-24 Thread Alan Gauld via Tkinter-discuss
On 24/01/2020 09:15, Michael Lange wrote: >>> is it possible to draw a horizontal line in the Text() widget, >>> something like the in html, extending all over the widget. >> >> Would a line of spaces with the underline turned on in the font work? >> If you use a monospace font the length should

Re: [Tkinter-discuss] new location for John Shipman's Tkinter reference manual

2020-10-10 Thread Alan Gauld via Tkinter-discuss
On 28/08/2020 20:20, Mark Roseman wrote: > In the interest of keeping this resource available on a more permanent > basis, I’ve placed a copy on the TkDocs site: > > https://tkdocs.com/shipman/ > If you maintain web pages that link to the original site, you’re more > than welcome to link to this

Re: [Tkinter-discuss] major update to TkDocs tutorial

2020-10-10 Thread Alan Gauld via Tkinter-discuss
On 09/10/2020 17:09, Mark Roseman wrote: > Just wanted to let people know that I’ve done a major revamp of the > multi-lingual Tk tutorial at https://tkdocs.com Well done, I've used that site a few times it is very useful, I'll certainly take a looksee. I spent lockdown translating a Linux curses

[Tkinter-discuss] Running tkinter from MacOS Automator

2022-05-01 Thread Alan Gauld via Tkinter-discuss
I have a Tkinter application on MacOS (Monterey) and wanted to run it from the desktop. I built a workflow in automator that simply ran the bash commandline to launch python and my app. I saved the workflow to the desktop. When I click it my app starts OK but the UI is all in black apart from the

Re: [Tkinter-discuss] Running tkinter from MacOS Automator

2022-08-19 Thread Alan Gauld via Tkinter-discuss
On 03/05/2022 02:00, Kevin Walzer wrote: > On 4/29/22 8:54 AM, Alan Gauld via Tkinter-discuss wrote: >> When I click it my app starts OK but the UI is all in black apart >> from the buttons and scrollbars. Everything works ok (buttons, >> menus etc) except I can't see a

[Tkinter-discuss] Get menu index from label

2023-04-14 Thread Alan Gauld via Tkinter-discuss
I'm trying to extract a menu entry's index given the entry label. ie for the typical File... menu, with entries of: New, Open, Save, Save As, etc... How do I get the index of the entry labelled "Save As", given I have a reference to the containing menu object? Once I have an index I can do variou

Re: [Tkinter-discuss] Running from a cron job?

2023-04-14 Thread Alan Gauld via Tkinter-discuss
On 15/02/2023 20:58, Bob Greschke wrote: > Hi! Hi, sorry for a late response. > I'm writing a tkinter utility, more than a program, Why use Tkinter if there is no GUI? > plots the data from the file(s) that do not have a > corresponding image file, does an ImageGrab.grab() of the Canvas Coul

Re: [Tkinter-discuss] Get menu index from label

2023-04-15 Thread Alan Gauld via Tkinter-discuss
On 14/04/2023 23:35, Bryan Oakley wrote: > You can use the label string as the index. Or more accurately, a pattern > that matches an element. Once tkinter finds an item that matches the > pattern, that item will be used. For example, "Save*" might match both > "Save" and "Save As...", but whicheve