[Tkinter-discuss] Tkinter compatibility with and enhancements for Windows 8 Metro GUI

2013-03-03 Thread python
Looking for feedback on Tkinter compatibility with Windows 8 Metro GUI and if there are any 3rd party libraries that support Windows 8 Metro touch screen enhancements. Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http

[Tkinter-discuss] Tkinter for iOS (iPad//iPhone)

2013-03-03 Thread python
I've been away from Tkinter for awhile. Curious if Tkinter is available for iOS devices (iPad//iPhone)? My google searches have not come up with anything interesting. Thanks! Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://m

Re: [Tkinter-discuss] DRAG and DROP image

2012-09-03 Thread python
Kevin, > Another option for cross-application drag and drop: > http://klappnase.bubble.org/TkinterDnD/index.html Any experience with the experimental version 2 of the above library? TkinterDnD2 is a python wrapper for George Petasis' tkDnD Tk extension version 2. http://klappnase

Re: [Tkinter-discuss] General Tkinter Assistance Module

2012-03-11 Thread python
Hi Lion, Read your spec on google-docs [1], saw my name mentioned as a slacker, and felt obligated to contribute to the discussion. > specific functions that you think would be valuable Here's what I've been frustrated trying to create with Tkinter/ttk: Framework level enhancements - simple jq

Re: [Tkinter-discuss] General Tkinter Assistance Module

2012-02-21 Thread python
Hi Lion, I've thought about what you've proposed many times (a Tkinter framework), but have never had the time to implement it. I think all your suggestions are on target. Malcolm I'm thinking of a module that: * supplies functions/tools to examine the widget hierarchy from the shell * pre

Re: [Tkinter-discuss] Hint text

2011-12-29 Thread python
Hi Charles, There are many modules that add tooltip functionality to Tkinter; google tooltip tkinter for a list. One of my favorite tooltip modules is: http://code.activestate.com/recipes/576688-tooltip-for-tkinter/ If you research this topic in more depth, let us know what module you end up usi

Re: [Tkinter-discuss] Autocomplete example on wiki

2011-06-25 Thread python
Dear Mick, > Having looked at your version of the code, I see that the method: def > handle_keyrelease(self, event) is indented one tab too far. Thank you for taking the time to uncover the problem in my code. I can't believe I missed that indentation error! Thanks again! Malcolm ___

[Tkinter-discuss] Autocomplete example on wiki

2011-06-23 Thread python
I'm looking for a way to add autocomplete functionality to my Windows based Tkinter applications running under Python 2.7 (32-bit). I've started by using code found on the wiki, but I'm open to other suggestions as well. Ideally I'd like a solution that works with the ttk.E

[Tkinter-discuss] Tkinter library/technique that supports panels that can be docked, undocked, and resized?

2011-02-01 Thread python
is is a short 1 minute screencast of a wxPython based framework called Dabo demonstrating the capabilities that my users have asked for. http://screencast.com/t/3qRgqHsJVbK I'm using Python 2.7 under Windows and have noticed that Tkinter appears to have some built-in concept of docking when TopLev

Re: [Tkinter-discuss] Tkinter and signal handling

2011-01-16 Thread python
Michael, > until the mouse enters the Tkinter window *or* the window receives keyboard > focus Does adding a widget (any widget) that receives keyboard focus to your root form fix this problem? What if you explicitly set focus to this control after you create your root window? I'm not on a Lin

Re: [Tkinter-discuss] canvas origin is off by 2 pixels, is this normal

2011-01-06 Thread python
Stefanix, When you create your Canvas, try setting these properties in your Canvas creation statement: borderwidth=0 highlightthickness=0 Both these properties consume visual space in your canvas. If you need non-zero values for these properties, then just account for the edge pixels consumed b

[Tkinter-discuss] Re-arrange ttk.treeview columns via drag and drop?

2010-12-30 Thread python
Is there a way to for users to re-arrange column order in the ttk.treeview widget? Many grid-like user interfaces allow a user to drag and drop columns to change column order. Any such capability present in the ttk.treeview widget? Thank you, Malcolm ___

[Tkinter-discuss] Tkinter accessability options

2010-12-30 Thread python
I'm cross-posting this thread from python-list. > Not all the people were happy because the darkness disappeared partially for > some of them and more and more blind people started to use a computer, and > discovered that the Tk interfaces are absolutely inaccessible for the

Re: [Tkinter-discuss] Use underline

2010-12-29 Thread python
Cristian, You have to bind your Alt key presses separately. The underline= only underlines the letter - it does not bind to an event handler. Here's a snippet that may give you some ideas. Disclaimer: I'm not sure if its best practice or not. Malcolm """ Treat Alt+I as a shortcut keystroke for

[Tkinter-discuss] Using 3rd party Tk/Tcl libraries with Python/Tkinter

2010-12-20 Thread python
>From time to time I've seen Tkinter developers reference 3rd party Tk/Tcl libraries. Some examples are the PMW widgets, TkDnd, and TkTable. Here are some questions about these 3rd party components from the perspective of a Python developer new to Tkinter (without any Tk/Tcl experience)

Re: [Tkinter-discuss] Techniques for creating tables/grids (was When to use a Canvas vs. a Frame from a container perspective?)

2010-12-20 Thread python
Cameron, . > While many valuable applications have been coded through the years using > exactly this cell-in-Text technique, and the code above nicely demonstrates > the promised scrolling, those focused on spreadsheet-like constructs will > want to know about http://tkin

Re: [Tkinter-discuss] [Fwd: Off Topic : Tkinter in everyday life]

2010-12-20 Thread python
> I want to thank everyone for the excellent feedback to my questions. I think > we all share the view that Tkinter is a rough diamond. > > Through all the examples that have selflessly shared, I can see that their > limitations are given only by the limits of our imagination. > > It has been re

Re: [Tkinter-discuss] Anyone using Tkinter for mobile device applications?

2010-12-20 Thread python
Cristian, Thanks for the links. Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] What do you feel is missing from Tkinter?

2010-12-19 Thread python
;s a slightly simplified version of a Pmw.ScrolledFrame in pure > Tkinter that uses ttk. It seems to work ok (I haven't done much testing > though): > > http://tkinter.unpy.net/wiki/ThemedScrolledFrame Hey, cool! Thanks for sharing that example. Looks great on

Re: [Tkinter-discuss] When to use a Canvas vs. a Frame from a container perspective?

2010-12-19 Thread python
Mick, > As an example of how to use a Text widget as a container, > below is a simple spreadsheet made using Entry widgets organised > into a Text widget. The user can edit cells, and later save the values of > the cells as a tab delimited file by pressing the "Save" button. Cool! Thank you for s

Re: [Tkinter-discuss] What do you feel is missing from Tkinter?

2010-12-19 Thread python
Kevin, > A similar result can be achieved on Windows with IE and OpTcl. Thanks for this tip. Anyone else doing something with this type of browser/Tkinter integration under Windows? Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org ht

[Tkinter-discuss] Anyone using Tkinter for mobile device applications?

2010-12-19 Thread python
Wondering if any of you are using Tkinter for mobile device applications and if so, what has your experience been like (tricks, traps, etc)? By mobile I mean small Linux devices, ipad/iphone, Windows CE or the new mobile Windows 7 Mobile. Thanks, Malcolm __

Re: [Tkinter-discuss] When to use a Canvas vs. a Frame from a container perspective?

2010-12-19 Thread python
Mick, > I use both Canvas and Text for scrollable containers. > I use the Canvas when I want pixel accurate placement. > > I use a Text widget for more lazy placement (one can place items after each > other on a row, and start a new row with a "\n"). One can make spreadsheets > by placing rows o

Re: [Tkinter-discuss] What do you feel is missing from Tkinter?

2010-12-19 Thread python
ts of the Tcl/Tk core. Python wrapper http://tix.sourceforge.net/Tixapps/src/Python/TkHtml.py Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] What do you feel is missing from Tkinter?

2010-12-19 Thread python
Michael, > A few other things I miss from Tkinter: > support for image formats other than gif We use PIL which adds about 700K to our Window distributions. My understanding is that PIL is cross platform, available for both the 2.x and 3.x branches of Python and both the 32-bit and

[Tkinter-discuss] What do you feel is missing from Tkinter?

2010-12-18 Thread python
This post was inspired by Craf's recent post on "Tkinter in everyday life". I'm a recent and enthusiastic convert to Tkinter after having rejected this toolkit for many years. After digging into Tkinter and through the very generous help on this mailing list and elsewhere (stackoverflow.com), I'v

Re: [Tkinter-discuss] Off Topic : Tkinter in everyday life

2010-12-18 Thread python
er help and code snippets is stackoverflow.com. Search on 'tkinter' or 'ttk'. > One question that comes to me, is why very few people work with this tool? My impression is that many, many, many more people use Tkinter than post on this mailing list :) I've read wher

Re: [Tkinter-discuss] When to use a Canvas vs. a Frame from a container perspective?

2010-12-17 Thread python
Michael, > However I agree, it's better to use create_window() to avoid pitfalls like > this. 1. So the proper way to use Canvases as containers for traditional widgets is to manually handle layout and place all widgets via the create_window() method. 2. The only reason to use a Canvas as a con

Re: [Tkinter-discuss] When to use a Canvas vs. a Frame from a container perspective?

2010-12-17 Thread python
Hi Mick, > I have never heard of packing widgets within a canvas. Here's the link that gave me that impression: http://stackoverflow.com/questions/4080413/python-tkinter-place-a-widget-in-a-canvas-widget You can easily add widgets to a canvas just like you do any other container, us

Re: [Tkinter-discuss] When to use .update() vs. update_idletasks()?

2010-12-17 Thread python
Michael, > BTW, for those who want to read more about update() vs. update_idletasks(), > there are two pages on the tcl'ers wiki that discuss the potential problems > with the update() method in more detail: > > http://wiki.tcl.tk/1252 > http://wiki.tcl.tk/1255 Excellent resources. Thank you,

Re: [Tkinter-discuss] When to use .update() vs. update_idletasks()?

2010-12-17 Thread python
> As a rule of thumb I'd say: *never* use update() unless you really need it. > If update_idletasks() does the job, it is to be preferred. Thanks Michael, that's a great tip. Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://ma

[Tkinter-discuss] When to use a Canvas vs. a Frame from a container perspective?

2010-12-17 Thread python
This question is related to using Canvases and Frames as containers and does not consider the drawing capabilities of the Canvas widget. Canvas and Frames are both containers. My understanding is that both of these containers provide identical layout behaviors via their pack, grid, and place metho

[Tkinter-discuss] Stipple use cases and/or examples?

2010-12-17 Thread python
I've seen the term "stipple" mentioned in recent posts. The Tkinter documentation is woefully short on details here. I've googled for examples and found very few. For those with the same question as me, here's one example. http://infohost.nmt.edu/tcc/help/pubs/tkinter/std-attrs.html My question is

[Tkinter-discuss] When to use .update() vs. update_idletasks()?

2010-12-17 Thread python
Looking for some advice on when to use .update() vs. update_idletasks(). Are there use cases that favor the use of one of these techniques vs. the other? Are there situations where one of these techniques should always or never be used? Thank you, Malcolm __

Re: [Tkinter-discuss] Techniques for creating the appearance of frames with custom border colors

2010-12-17 Thread python
Michael, Your code works wonderfully - thank you very much!! One question: Why did you add your inner frame to the canvas as a window via c.create_window() vs. just packing the frame? I tried the frame packing technique per the following code change (replacing c.createwindow with pack): f = Fra

Re: [Tkinter-discuss] Techniques for creating the appearance of frames with custom border colors

2010-12-17 Thread python
> On 2, definitely. Rather than using fill, you could set the outline color, style, and width (e.g. dash/stipple): [1]> http://effbot.org/tkinterbook/canvas.htm Thanks Wayne, Malcolm References 1. http://effbot.org/tkinterbook/canvas.htm ___ Tkinter-d

Re: [Tkinter-discuss] experimental tk program in python3

2010-12-17 Thread python
Michael, Ah, I see! The trick seems to be: - don't set a frame's border width or relief properties (or reset them to 0 and 'flat') - set highlightcolor= - set highlightbackground= - set highlightthickness= I think that also answers the question I just posted regarding how to create the appearanc

[Tkinter-discuss] Techniques for creating the appearance of frames with custom border colors

2010-12-17 Thread python
I understand that Tkinter frames do not have a property that allows their border color to be customized. Here are some high level ideas I have on how to create a colored border effect - any suggestions on best practice appreciated. 1. Turn off the frame's border. Enclose the frame in a parent fra

Re: [Tkinter-discuss] experimental tk program in python3

2010-12-17 Thread python
Hi Michael, > For widgets that don't accept keyboard focus you can use the > highlightbackground option to create a colored border (although you cannot > add a "3D"-relief this way) ... I took your example and added another frame and widgets that gain focus. Your highlightbackground suggestion

Re: [Tkinter-discuss] experimental tk program in python3

2010-12-16 Thread python
Dave, Works in Python 2.7 by changing import statements to: from Tkinter import * import ttk Is there a way to change a frame's border color? (I think this is a Tkinter limitation, but I'd love to be proven wrong) I don't think your border width spinner updates the border

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
Michael, >> Is there a way to drill-down to the Tk label controls in the captions >> and bind to their events? Or is there a way to expose the tabs >> as actual widgets whose events can be bound to? > I don't think this is possible, it looks like the notebook widget itself > is one window that c

[Tkinter-discuss] Very interesting code sample: A Ttk Notebook with close buttons

2010-12-15 Thread python
grafted on widgets that are place()-ed above controls. Here's the copy and paste code for Python 3.1; the usual Tkinter/ttk import statements need to be adjusted for Python 2.7. http://www.java2s.com/Open-Source/Python/3.1.2-Python/Demo/Demo/t kinter/ttk/notebook_closebtn.py.htm Note: You need to s

Re: [Tkinter-discuss] Change ttk.Notebook tab's font or font height?

2010-12-15 Thread python
Michael, > The following example seems to do what you want, at least unless you change > the theme in use > > f = tkFont.Font(family='helvetica', size=-12) > s = ttk.Style() > s.configure('.', font=f) That is **exactly** what I was looking for. Once again, thank you so much for your help. Tkin

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
Michael, Thank you so much for your example!! Re: Detect mouse events on tabs. The trick for me was understanding how to use the index method. Your technique below is exactly the solution I was looking for (I wasn't aware of the '@%d,%d' formatting technique). index = event.widget.index('@%d,%d'

Re: [Tkinter-discuss] [Fwd: Change ttk.Notebook tab's font or font height?]

2010-12-15 Thread python
Cristian, > Here: http://code.activestate.com/recipes/541092-tknotebook/ > > Here's how to create a class to create notebook. With a little patience can > be converted for use with 8.5 tkinter.ttk and Python 3.1 Thank you! Malcolm __

[Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
I'm using the ttk.Notebook widget. What object do I bind to capture events related to specific tabs? I would like to trap when a tab caption gets keyboard focus ('') and when the mouse pointer is over a specific tab caption (''). I can trap mouse clicks on tabs (, ), but I can't find a way to det

[Tkinter-discuss] Change ttk.Notebook tab's font or font height?

2010-12-14 Thread python
Is there a way to change the ttk.Notebook tab's font or font height? Use case: I would like to use a named font object for my tab captions so a user can change the height of the named font and have the font sizes of all the widgets on a page increase in size (including the ttk.Notebook tab caption

[Tkinter-discuss] Ideas for user interface to allow users to change order of ttk.Notebook pages/tabs?

2010-12-14 Thread python
I'm using the ttk.Notebook widget to manage a list of open files. I create and destroy tabs as a user opens and closes files. I would like to offer my users a way to change the order of the notebook tabs. Ideally I would like my users to be able to drag and drop tabs like they do in Firefox, but I

Re: [Tkinter-discuss] ssh login through Tkinter - problem on windows

2010-12-14 Thread python
Michael, > pipe = subprocess.Popen(args, stdout=subprocess.PIPE, > stderr=subprocess.STDOUT, shell=False) What happens when you try shell=True? Also, is there a way to run ssh unbuffered? What happens when you exit root.mainloop()? Can you try a root.after( 1000, root.quit ) to see if your exa

Re: [Tkinter-discuss] Ttk.Labelframe control label does not change color

2010-12-12 Thread python
Craf, > Changing the background color ttk.Labelframe control, label does not change > color. I believe this is by design, eg. none of the ttk widgets allow their foreground or background colors to be changed because these colors are determined by the system's current color scheme. Malcolm _

Re: [Tkinter-discuss] How do Tkinter's Entry/Text support for Ctrl+X/Ctrl+C/Ctrl+V (cut, copy, paste) work in non-English locales?

2010-12-10 Thread python
Michael, > >>> e1.event_delete('<>', '') > >>> e1.event_add('<>', '') Thank you! That's the *exact* technique I was searching for. > I'm not sure if this would make sense, though. Aren't these default bindings > the same for any locale (at least this is true for germany :)? I mistakenly thoug

[Tkinter-discuss] What determines the initial position of Tkinter's root and Toplevel() windows?

2010-12-10 Thread python
What determines the initial position of Tkinter's root and Toplevel() windows? Under Windows (running Python 2.7), my root window appears to show up in random positions (usually clustered around the upper left of my display). The position of my first Toplevel() window appears to be rand

[Tkinter-discuss] Tips for using Tkinter in non-US locales and/or locale module integration with Tkinter Entry widgets

2010-12-10 Thread python
I noticed there are a lot of non-US developers on this list. I'm looking for tips on using Tkinter in non-US locales. In particular: 1. Are there any Unicode or font specific issues to be concerned about? 2. Are you using the locale module to control how you display or parse data moving into and

[Tkinter-discuss] How do Tkinter's Entry/Text support for Ctrl+X/Ctrl+C/Ctrl+V (cut, copy, paste) work in non-English locales?

2010-12-10 Thread python
It seems that Tkinter Entry and Text widgets have built in support for basic clipboard functionality via the keystrokes Ctrl+X/Ctrl+C/Ctrl+V (cut, copy, paste). Of course these make sense for English speaking locales. How does this functionality work when Tkinter is used in non-English locales? Ar

Re: [Tkinter-discuss] Recommendations on when to use pack vs. grid layouts?

2010-12-10 Thread python
Mick, > If you are placing a row of widgets into a frame, with pack you don't have to > keep track of which column you are up to, just pack them one after the other. I think grid() will automatically increment the row if you don't specify it. Malcolm

Re: [Tkinter-discuss] How to determine if a widget is pack()-ed or unpacked via pack_forget()?

2010-12-10 Thread python
Mick, Perfect - that's just what I was looking for. Malcolm From: "Michael O'Donnell" Look at: w.winfo_ismapped() ...Note that if a widget IS packed, but the parent (or some ancestor) is not, this will return False. w.winfo_manager() -- will return "" if the widget is not packed/gridded e

Re: [Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?

2010-12-10 Thread python
Michael, Your pack_forget() code works like a charm! Thank you, Malcolm From: "Michael Lange" To: tkinter-discuss@python.org Date: Thu, 9 Dec 2010 15:51:23 +0100 There's nothing like that built in, but it is quite easy to set it up: from Tkinter import * root = Tk() root.geometry('200x200'

[Tkinter-discuss] Recommendations on when to use pack vs. grid layouts?

2010-12-09 Thread python
Are there any best practice tips regarding when one should use pack vs. grid for their layouts? >From what I've been reading via google, the concencus seems to be that grid can handle any pack scenario but not vice-versa. Thanks, Malcolm ___ Tkinter-dis

Re: [Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?

2010-12-09 Thread python
Michael, Thanks for the pack_forget() implementation and for the confirmation that one should use grid vs. pack for scenarios that require showing/hiding widgets. Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org

Re: [Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?

2010-12-09 Thread python
> Is there a best practice way to show/hide specific widgets (or containers) in > Tkinter? Another way to control visibility might be to size a control/widget a height/width of 0,0. But Tkinter ignores this type of size request. (It does accept a size request of 1,1, but in the case of Frame, im

Re: [Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?

2010-12-09 Thread python
Kevin, > No, there isn't. You have to be careful with the packing order for pack_forget() to work--this works best if you limit its use to the last widget group packed. Otherwise, it may be packed in a different location, with surprising results. Thanks for that tip! (You're right - I would ha

[Tkinter-discuss] How to determine if a widget is pack()-ed or unpacked via pack_forget()?

2010-12-09 Thread python
Is there a widget method that returns whether a widget is pack()-ed or unpacked? The same question applies to widget's placed with the grid() or place() layout managers. Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http:

[Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?

2010-12-09 Thread python
Is there a pack equivalent of the grid_remove() method where a widget's original pack() settings are restored on a re-pack()? Use case: When I show a packed widget that has been hidden via pack_forget(), I would like to have the widget re-packed with its original pack settings when I issue the widg

[Tkinter-discuss] Possible to set the min/max height or width of a Tkinter or ttk Frame?

2010-12-09 Thread python
The size of Tkinter windows can be controlled via the following methods: .minsize() .maxsize() .resizable() Are there equivalent ways to control the size of Tkinter or ttk Frames? Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@pyth

[Tkinter-discuss] Possible to create single pixel wide horizontal/vertical ttk.Separator's?

2010-12-07 Thread python
Is there a way to create single pixel wide horizontal and vertical ttk.Separator()'s? Python 2.7/Windows: When I magnify the ttk Separators they are built as 2 parallel lines - one line gray and one line a light/white color. The latter color added to create a subtle 3d effect? I would li

[Tkinter-discuss] Recommendations for free and commercial icon/image sets licensed for commercial use?

2010-12-07 Thread python
Any recommendations for free and commercial icon/image sets licensed for commercial use? I've seen some really high quality icons/images in open source software lately, but I suspect most of these image sets are GPL in nature, thus (in my interpretation) not available for use in commercial product

Re: [Tkinter-discuss] Force a Frame and/or Text widget to a specific width?

2010-12-07 Thread python
resizes. Is this possible? Thank you, Malcolm - Original message - From: pyt...@bdurham.com To: "Python-Tkinter" Date: Tue, 07 Dec 2010 11:07:43 -0500 Subject: [Tkinter-discuss] Force a Frame and/or Text widget to a specific width? Is there a technique where I can force a Frame a

[Tkinter-discuss] Force a Frame and/or Text widget to a specific width?

2010-12-07 Thread python
dow, it snaps to the width it wants to go to when I don't force maxsize(). BTW: I'm using 32-bit Python 2.7 for Windows. Am I missing something obvious? Thanks, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

[Tkinter-discuss] Possible to fade a small Tkinter image into a specific background color?

2010-12-06 Thread python
Wondering if there's a PIL/Tkinter technique I can use to fade a small image into a specific background color? Use case: I have a small message area that displays both an icon and text message. I can fade my foreground text into its background container by iteratively moving my message text's rgb

[Tkinter-discuss] Control vertical position of checkbutton [x] when wrap= creates multiline checkbutton captions

2010-12-02 Thread python
Is it possible to control the vertical position of the checkbutton widget's [x] when the checkbutton has multi-line text? It appears that Tkinter vertically centers the [x] relative to the word-wrapped checkbutton text that spans multiple lines (activated via the wrap= option). I would like to anc

Re: [Tkinter-discuss] Removing/disabling a resizable window's maximize button under Windows

2010-12-02 Thread python
Michael, Here's an updated version of my event handler that restores a window to its previous size/position when a maximize event is detected. Apparently all one can do within the event is change the state of a window - changes to a window's geometry (size/position) are ignored. The following is

Re: [Tkinter-discuss] Removing/disabling a resizable window's maximize button under Windows

2010-12-02 Thread python
Thanks for your help. Here's what I discovered (Python 2.7 under Windows 7): Binding a toplevel window's event traps events for all of the window's widgets, not just the window itself. So here's how I coded my event handler: def onFrmResize( event=None ): i

[Tkinter-discuss] Customize horizontal padding between image and text in Label widget?

2010-12-01 Thread python
Is there a way to customize the horizontal padding between an image and text in a Label widget when compound=left or right? The 2 ways I can think of are: 1. Use PIL to dynamically add columns of pixels to an image 2. Insert or append spaces to the text= option of the label to force the separati

[Tkinter-discuss] Removing/disabling a resizable window's maximize button under Windows

2010-12-01 Thread python
Looking for advice on how to remove or disable a *resizable* window's maximize button under Windows. I'm using Python 2.7 for Windows. Background: I have a resizable window with min and max sizes set via the window's minsize() and maxsize() methods. When a user clicks the maxim

Re: [Tkinter-discuss] Anyone building MS Office-like ribbonbar interfaces using Tkinter?

2010-12-01 Thread python
Kevin, > Tkribbon might be of interest: > > http://bit.ly/hLrwIO > > That link includes the announcement and a download link. > > And a few screenshots: > > http://www.ellogon.org/~petasis/tcl/TkRibbon/images/TkRibbon-Default.png > http://www.ellogon.org/~petasis/tcl/TkRibbon/images/TkRibbon-M

Re: [Tkinter-discuss] Right justify Label against Entry using pack?

2010-12-01 Thread python
John, > The following simplification of your code works for me on linux, also > illustrating the use of justify: Thank you for your explanation and sample code. My problem was I didn't know that anchor was an option for widgets - I thought this option only applied to the pack() method. Configur

[Tkinter-discuss] Right justify Label against Entry using pack?

2010-12-01 Thread python
I'm experimenting with geometry layouts and would like to know if its possible to line up a Label and an Entry widget (in the same horizontal line) and have the Label widget right align to the Entry widget. I know I can do this via grid, but I'm wondering if this is possible via pack. Here's the 1

[Tkinter-discuss] Anyone building MS Office-like ribbonbar interfaces using Tkinter?

2010-12-01 Thread python
Curious if any of you are building MS Office-like ribbonbar user interfaces using Tkinter? If so, I would love to see a screenshot to see what is possible. We're starting to get more requests for this type of modern user interface. Personally, I hate the new MS Office ribbonbars (after more than 2

[Tkinter-discuss] Possible to create equivalent of named font objects for colors?

2010-11-29 Thread python
Tkinter has a cool way to create named font objects that can be used across widgets. When a named font object is updated, all the widgets that use the named font automatically update their fonts as well. Is there a similar way to implement "named colors", eg. where we can update a "color object" i

[Tkinter-discuss] Tkinter support different styles of underlining?

2010-11-29 Thread python
Does Tkinter (directly of via tk/tcl) support different styles of underlining, eg. dotted underlines or squiggly underlines (typically used to indicate a word is misspelled in MS Word or FireFox)? Thank you, Malcolm ___ Tkinter-discuss mailing list Tkint

Re: [Tkinter-discuss] Change the font style (bold, italic, stikethru, normal) of widgets without explictly knowing font?

2010-11-22 Thread python
Hi Michael, > If you don't explicitely define the label's font, the font is a string (at > least here, on linux): > >>> from Tkinter import * > >>> l=Label(text='foo') > >>> l.pack() > >>> l.cget('font') > &#x

Re: [Tkinter-discuss] Change the font style (bold, italic, stikethru, normal) of widgets without explictly knowing font?

2010-11-22 Thread python
Wayne, > mylabel.config(font=mylabel.config()['font'][4][:2] + ('normal',)) > mylabel.config(font=mylabel.config()['font'][4][:2] + ('bold', 'italics')) That works! Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://m

[Tkinter-discuss] Change the font style (bold, italic, stikethru, normal) of widgets without explictly knowing font?

2010-11-22 Thread python
Is there a simple way to change the font style of widgets without explictly knowing the widget's font? For example: if I want to toggle the bold state of a widget's text, do I need to determine its font, then build an equivalent font object/expression with the font style I need, and pass that full

Re: [Tkinter-discuss] Working with tear-off menus (change the "-----" label, customize location/appearance of tear-off window)

2010-11-22 Thread python
Hi Michael, Thank you for your help. Your solution works well (tested under Windows 7 with 32-bit Python 2.7). Regards, Malcolm > 2. Is there a way to customize the location and appearance of the > window that contains a tear-off menu? On Windows, the tear-off > menus appear

Re: [Tkinter-discuss] Working with tear-off menus (change the "-----" label, customize location/appearance of tear-off window)

2010-11-22 Thread python
Hi Jeff, Thank you! Confirming that your code works under Windows 7 with 32-bit Python 2.7. Regards, Malcolm From: "Jeff Epler" You can manually create a tearoff from a menu: % .m clone .mt tearoff and post it at a desired location: % .mt post 100 100 As suggested in

[Tkinter-discuss] Working with tear-off menus (change the "-----" label, customize location/appearance of tear-off window)

2010-11-21 Thread python
I've been experimenting with Tkinter tear-off menus and have the following questions (relative to Windows): 1. Is there a way to change the default appearance of the "--" menu label that is used to indicate a tear-off menu -OR- is there a way to programmatically convert a menu widget to a torn

Re: [Tkinter-discuss] Bind to event related to currently selected menu item

2010-11-21 Thread python
xt menu from my previous example but only with a cascaded menu. Your example fails for both context and cascading menus under 32-bit Python 2.7 for Windows. I appreciate your and Michael's help. Thank you both! Malcolm Thus spoketh "Michael O'Donnell" unto us on Sun, 21 Nov

Re: [Tkinter-discuss] Looking for example of how to use <> to determine currently selected menu item

2010-11-21 Thread python
ter (it's definitely a bug within > Tkinter.py, and I doubt that it has been fixed since 2.6.5), I'll send > another post when I know more. Of course for now you are right, your code > "just works" :) I can confirm that this bug still exists in 32-bit Python 2.7

Re: [Tkinter-discuss] Looking for example of how to use <> to determine currently selected menu item

2010-11-21 Thread python
Hi Michael(s): > At least in Python 2.5.4 linked to Tk 8.4 (Windows version), > the following fails because event.widget holds a string (the tcl/tk > widget name), not a Tkinter class. > > def callback(event): >    print event.widget.index('active') > > Maybe f

Re: [Tkinter-discuss] Bind to event related to currently selected menu item

2010-11-21 Thread python
Michael, Thank you! That's EXACTLY the solution I was looking for :) Regards, Malcolm Change your statusbarUpdate for the following, which will print out the index of the currently selected menu item: def statusbarUpdate( event=None ): print tk.call(event.widget, "index", "active") Note th

Re: [Tkinter-discuss] Looking for example of how to use <> to determine currently selected menu item

2010-11-20 Thread python
Hi Michael, Thank you for your idea to use the event. That works when I use the mouse, but it doesn't work when a user uses the cursor keys to move between menu items. I can trap the <> event - I just need a way to determine the current menu widget and its active index. The event object passed

Re: [Tkinter-discuss] Bind to event related to currently selected menu item

2010-11-20 Thread python
Kevin, > Try <>. Thanks for the recommendation. Any suggestions on how I can determine the currently selected menu item in the event raised by <>? # here's how I create my popup menu popup = tk.Menu( menubar ) popup.bind( '<>', statusbarUpdate ) # here's the command I bind to def statusbarUpdat

[Tkinter-discuss] Looking for example of how to use <> to determine currently selected menu item

2010-11-19 Thread python
I'm looking for an example of how to use <> to determine currently selected menu item. Use case: Display a context sensitive help message in an application's statusbar as a user navigates through various menu items. Thank you, Malcolm ___ Tkinter-discus

[Tkinter-discuss] Bind to event related to currently selected menu item

2010-11-18 Thread python
Wondering if there's a menu event I can bind to that's related to the currently selected menu item? By menu item I mean the items that show up in a popup menu like New, Open, Save, etc. Use case: I would like to update a statusbar area of our application with a description of the currently selected

[Tkinter-discuss] Swap position of 2 widgets positioned in parent container via pack() or grid()?

2010-11-15 Thread python
Any tips on how I can swap the position of 2 widgets who have been positioned in a parent container via pack() or grid()? Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discu

Re: [Tkinter-discuss] Definitive list of all Tkinter events?

2010-11-13 Thread python
Cameron, > The page has been updated: > http://tkinter.unpythonic.net/wiki/Events Thank you! These are excellent references to generic events. How does one discover (virtual) events like <>, <>, <>, <>, etc. Malcolm ___ Tkinter-discuss mailing list Tki

Re: [Tkinter-discuss] Definitive list of all Tkinter events?

2010-11-13 Thread python
Lion, > I've created > [1]http://tkinter.unpythonic.net/wiki/Events > on the wiki, to note the location of such a list if it is found, ... Thank you very much! Regards, Malcolm References 1. http://tkinter.unpythonic.net/wiki/Events ___ Tkinter-disc

[Tkinter-discuss] Definitive list of all Tkinter events?

2010-11-13 Thread python
Is there a single, master list of all possible Tkinter events? I've been searching for such a list without success. Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] Possible to create separator lines in a Tkinter Listbox?

2010-11-12 Thread python
Hi Wayne, > unichr(8213) looks pretty good. I'm not sure if your original desire is possible, but you could make it non-selectable by binding <>. > > 1. Is current selection one of the separators? > 2. If not, OK > 3. If so, change selection to the previous item Thanks! I'm following your strateg

Re: [Tkinter-discuss] Possible to create separator lines in a Tkinter Listbox?

2010-11-12 Thread python
Hi Michael, > tktreectrl can be found here: http://tktreectrl.sourceforge.net/ > and the python wrapper: http://klappnase.bubble.org/TkinterTreectrl/ > tablelist: http://www.nemethi.de/ > and the python module: http://tkinter.unpy.net/wiki/TableListWrapper Thank you for the links t

  1   2   >