Re: Tkinter module test: widget class not inserted in application frame

2022-06-18 Thread Rich Shepard
On Sat, 18 Jun 2022, Peter J. Holzer wrote: There is a comma (U+002C) here ... And a dot (U+002E) here. That was a typo when I wrote the message. And I usually add a space after commas and surrounding equal signs, all for easier reading. Thank you, Rich -- https://mail.python.org/mailman/lis

Re: Tkinter module test: widget class not inserted in application frame

2022-06-18 Thread Peter J. Holzer
On 2022-06-17 19:47:38 -0700, Rich Shepard wrote: > On Fri, 17 Jun 2022, Dennis Lee Bieber wrote: > > > > ContactNameInput, 'lname', > > > ContactNameInput, 'fname', > > This works if a tk.labelframe is where the widget is placed. In my case, as > MRAB taught me, the prope

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, Dennis Lee Bieber wrote: ContactNameInput, 'lname', ContactNameInput, 'fname', This works if a tk.labelframe is where the widget is placed. In my case, as MRAB taught me, the proper syntax is self,'lname'... self.'fname'... Thanks,

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Dennis Lee Bieber
On Fri, 17 Jun 2022 09:19:59 -0700 (PDT), Rich Shepard declaimed the following: >I'm not seeing the error source in a small tkinter module I'm testing. > >The module code: >--- >import tkinter as tk >from tkinter import ttk > >import common_classes as cc > >class ConactNameInput(tk.Frame)

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, MRAB wrote: This: self.inputs['Last name'] = cc.LabelInput( ContactNameInput, 'lname', input_class = ttk.Entry, input_var = tk.StringVar() ) should be this: self.inputs['Last name'] = cc.LabelInput(

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB
On 2022-06-17 18:06, Rich Shepard wrote: On Fri, 17 Jun 2022, MRAB wrote: You haven't shown the code for common_classes.LabelInput, but I'm guessing that the first argument should be the parent. [snip] You're passing in the _class_ ConactNameInput, but I'm guessing that it should be an _ins

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, MRAB wrote: You haven't shown the code for common_classes.LabelInput, but I'm guessing that the first argument should be the parent. Here's the LabelInput class: class LabelInput(tk.Frame): """ A widget containing a label and input together. """ def __init__(self,

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB
On 2022-06-17 17:19, Rich Shepard wrote: I'm not seeing the error source in a small tkinter module I'm testing. The module code: --- import tkinter as tk from tkinter import ttk import common_classes as cc class ConactNameInput(tk.Frame): def __init__(self, parent, *args, **kwarg

Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
I'm not seeing the error source in a small tkinter module I'm testing. The module code: --- import tkinter as tk from tkinter import ttk import common_classes as cc class ConactNameInput(tk.Frame): def __init__(self, parent, *args, **kwargs): super().__init__(parent, *args,