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') > 'Helvetica -12 bold' I get strings as well (32-bit Python 2.7 under Windows 7). > If you

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 Michael Lange
Hi, Thus spoketh Wayne Werner unto us on Mon, 22 Nov 2010 15:39:40 -0600: > On Mon, Nov 22, 2010 at 3:21 PM, wrote: > > > 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 wid

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

2010-11-22 Thread Wayne Werner
On Mon, Nov 22, 2010 at 3:21 PM, wrote: > 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/expres

[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 at random(?) place

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 the other messag

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

2010-11-22 Thread Michael Lange
Thus spoketh Jeff Epler unto us on Mon, 22 Nov 2010 07:26:41 -0600: > 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 the other message, you can use "wm resizeable" to make > it not change

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

2010-11-22 Thread 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 the other message, you can use "wm resizeable" to make it not change size: % wm resiz .mt 0 0 (Of course, I only tested this on linux, so on Window

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

2010-11-22 Thread Michael Lange
Hi, Thus spoketh pyt...@bdurham.com unto us on Sun, 21 Nov 2010 20:18:06 -0500: > 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 ind