[Tkinter-discuss] Fwd: LabelFrame question: UPDATE

Lynn Oliver raycores at gmail.com
Tue Feb 28 21:51:36 CET 2012


My apologies, but on further investigation I discovered that the problem is solved if I put  "Tkinter import " after "from ttk import " it works. 

The order was wrong in the main routine, but it seems that importing another module that imports Tkinter will fix the conflict.



Begin forwarded message:

> From: Lynn Oliver <RaycoRes at gmail.com>
> Subject: LabelFrame question: why do options change when importing from tkFileDialog?
> Date: February 28, 2012 11:22:14 AM PST
> To: Python-Tkinter <tkinter-discuss at python.org>
> 
> I have a main module that includes this statement correctly:
> 
> self.fc_inFrame = LabelFrame(self.fc_Frame, height=150, width=300, text="Input File Type", labelanchor=NW, relief="groove", bd=4, font=self.boldfont)
> 
> When I move that statement to another module, I get:
> _tkinter.TclError: unknown option "-bd"
> 
> If I change '-bd' to 'borderwidth' the error does not occur, but next I get:
> _tkinter.TclError: unknown option "-font"
> 
> I've discovered that 'bd=4' and 'font=...' both work if I import:
> from tkFileDialog import askopenfilename, asksaveasfilename, askdirectory
> from Tkinter import *
> import tkFont
> from ttk import *
> 
> And they both fail if I import only:
> from Tkinter import *
> import tkFont
> from ttk import *
> 
> Can anyone explain what is going on here?
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120228/7fcba88d/attachment-0001.html>


More information about the Tkinter-discuss mailing list