[Tkinter-discuss] Python 2.7: Themed "common dialog" tkinter interfaces via Ttk

2010-10-22 Thread python
I'm cross posting the following question from this thread on stackoverflow.com: http://stackoverflow.com/questions/3991130/python-2-7-themed-comm on-dialog-tkinter-interfaces-via-ttk Python 2.7 (32-bit) Windows: We're experimenting with Python 2.7's support for themed Tkinter (

[Tkinter-discuss] Control position of Tkinter common dialogs?

2010-10-25 Thread python
Python 2.7 under Windows: How can we control the position of Tkinter's common dialogs? Here's what we've discovered: * Certain common dialogs always open up relative to their parent window * Certain common dialogs always open up centered on the user's desktop

Re: [Tkinter-discuss] Control position of Tkinter common dialogs?

2010-10-26 Thread python
Firat, > You can create a new toplevel window in the middle of the screen, then make it invisible and position the dialog windows relative to this new toplevel... Like this: [1]http://paste-it.net/public/q2a5594/ Thank you very much for your solution - that's an excellent workaround for me. Best

Re: [Tkinter-discuss] Control position of Tkinter common dialogs?

2010-10-27 Thread python
Hi Matt, > I have a similar issue, however not for common dialogs but for a custom toplevel transient dialogs. As you create your dialog it's dimensions are not known until all idletasks have completed for child widgets being added to the dialog. Disclaimer: I'm new to Tkinter development so tak

[Tkinter-discuss] Cancel a window resize/move event trapped via

2010-10-28 Thread python
Is it possible to cancel a window event, eg. if one wanted to constrain a window to a certain location on a user's desktop? Returning 'break' from a window's event does not cancel window move or resize events. Thank you, Malcolm ___ Tkinter-discuss mail

[Tkinter-discuss] Advanced Text example showing "rich text" like or syntax color coding markup?

2010-10-28 Thread python
I'm new to Tkinter development. We have a very simple markup language that we would like to "syntax color code" using Tkinter's Text widget. I'm looking for a simple code snippet, demo app, or high-level narrative description that explains how one might do this from one or more of the following pe

[Tkinter-discuss] Using Win32 API to get around Tkinter limitations?

2010-10-29 Thread python
Wondering if there are ways to use the Win32 API to get around the following Tkinter limitations? 1. Inability to set custom mouse cursors via *.cur/*.ani files. 2. Determine the height or width of window properties such as titlebar, left/right and bottom window frame edges? Thank you, Malcolm _

Re: [Tkinter-discuss] Using Win32 API to get around Tkinter limitations?

2010-10-29 Thread python
d that, but from within IDLE (Python 2.7) this syntax raises an exception. Using this technique in scripts running from the command line (outside of IDLE) works well. Malcolm References 1. http://wiki.tcl.tk/8674 ___ Tkinter-discuss mailing list Tkinter-di

[Tkinter-discuss] Cross platform way to discover the height/width of window borders/titlebar, etc.

2010-10-29 Thread python
Is there a cross-platform way to discover the height/width of operating system rendered window borders/titlebars, etc? If not, any suggestions on how one might discover these properties when running under Windows using either ctypes or the pywin32 library? Thank you, Malcolm _

[Tkinter-discuss] How does Python's new ttk (Title) support work under Linux Qt and GTk?

2010-10-29 Thread python
Any comments on the concerns about ttk portability to Qt and GTk windowing systems? The following is from a recent thread on the python-list mailing list. > Tkinter is built-in and available on Windows, Mac, and Linux. If you're using Python 2.7 or 3.1 you can take advantage of Tkint

[Tkinter-discuss] Tkinter/ttk compatibility with Citrix/WTS (Windows Terminal Services)?

2010-11-03 Thread python
Anyone have any experience using Python Tkinter/ttk applications with Citrix or WTS (Windows Terminal Services)? Any concerns, gotchas, or workarounds we should be aware of? I googled this topic [1], [2] and came up with nothing. No news is good news ... but just checking to make sure. Thanks

[Tkinter-discuss] Possible to stack frames with frame transparency? (create widget w/gradient background)

2010-11-03 Thread python
New to Tkinter: Is it possible to stack frames on top of one another and if so, can frames have transparency? My goal is to create widgets with gradient backgrounds. I was hoping I could do this by placing an image in a frame and then placing an identical sized frame over this image frame. This on

Re: [Tkinter-discuss] Possible to stack frames with frame transparency? (create widget w/gradient background)

2010-11-04 Thread python
Michael, > To see what can be done, look at my tkinter-based interface, > at: http://www.wagsoft.com/CorpusTool/img/main.jpg Nice! So each of your top buttons (Project, Search, Autocode, etc) is actually a custom widget based on a canvas containing 3 images (manually placed via .create_image) and

Re: [Tkinter-discuss] Possible to stack frames with frame transparency? (create widget w/gradient background)

2010-11-05 Thread python
Hi Michael, > Full code for these buttons available from: > http://www.wagsoft.com/CTButtonCode.zip Thank you very much - I learned a lot from studying your code. Regards, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.

[Tkinter-discuss] Undo/redo in Entry widget or use a Text widget instead?

2010-11-05 Thread python
Is there a way to implement undo/redo in an Entry widget or should we use 1 line Text widgets in place of an Entry widget when we want a textbox like control with undo/redo? Thank you, Malcolm ___ Tkinter-discuss mailing list Tkinter-discuss@python.org h

[Tkinter-discuss] Possible to stretch an image via Label() or create_image() without PIL?

2010-11-07 Thread python
Is it possible to stretch a Tkinter image horizontally or vertically when the image is used in a Label() or painted via create_image() without having to dynamically create stretched images via PIL? Thank you, Malcolm ___ Tkinter-discuss mailing list Tkin

Re: [Tkinter-discuss] Possible to stretch an image via Label() or create_image() without PIL?

2010-11-08 Thread python
Lion, > PhotoImage has .zoom & .subsample; > You'd still be dynamically creating stretched images, but you wouldn't need PIL. > [1]http://www.pythonware.com/library/tkinter/introduction/x6606-m ethods.htm > Would that work for you? Thank you - that's exactly the solution I was looking for. Regar

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

2010-11-10 Thread python
How can I create non-selectable horizontal separator items in a Listbox, eg. separators equivalent to the Tkinter Menu widget's .add_separator()? Using chars like dashes and underscores looks awful. If this functionality is not possible, does anyone have a recommendation on a Unicode char similar

[Tkinter-discuss] Possible to disable individual items in a Tkinter Listbox?

2010-11-10 Thread python
Is here a way to disable individual items in a Tkinter Listbox? I'm looking for something like .itemconfig( index, state='disabled' ) (doesn't work) or a special character string that one might add to an item's text to cause it to be disabled. Thank you, Malcolm __

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

2010-11-12 Thread python
Lion, > You may want the "box drawing characters." > [1]http://en.wikipedia.org/wiki/Box-drawing_characters > Like this > ── and this ── Great reference and examples - just what I was looking for. Thank you! Malcolm References 1. http://en.wikipedia.org/wiki/Box-drawi

Re: [Tkinter-discuss] Possible to disable individual items in a Tkinter Listbox?

2010-11-12 Thread python
Cameron, >> Is here a way to disable individual items in a Tkinter Listbox? . > Unless recent versions have a configuration for this I haven't yet learned, the functionality you're after requires a custom binding. A custom binding meets my need. Thank you, Malcolm ___

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

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

[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] 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

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

[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

[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] 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

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

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-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-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] 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] 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

[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] 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

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

[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] 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

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

[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

[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] 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] 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

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

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

[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

[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

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

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

[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

[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] 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

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] 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

[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] 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] 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] 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:

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

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
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

[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-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'

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] 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

[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

[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] 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

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

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] 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

[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

[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] 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

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 __

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] 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

[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] 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

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] 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

[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
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

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] 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

[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 __

[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 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

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

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 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 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] 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

[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] 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

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] 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

[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 __

  1   2   >