Feb-15-2022, 07:25 PM
Hi, I am really new to python and wishing I had gotten into it a lot earlier than I did. I have advanced considerably with my learning and have been using tkinter as a UI for its ease of use. Currently I am reading up on classes and using what I have learnt to build a custom widget. I am struggling to understand and how to implement **kwargs. Below is code I have found on a web site, it says I can pass in as many options as I want but did not give an example, can someone give me an example of how I would pass in perhaps some text for a canvas and/or a color for a canvas backgroud.
Jeff
class ClassName(Tk.Frame): def __init__( self, parent, **options ): Tk.Frame.__init__( self, parent, **options )T.I.A.
Jeff