Python. Problem with tkinter notebook frame

0

first of all say that I am new to python.

I'm doing an application in python, which uses the ttk. I would like to change the background color of the application (not the gray that comes out by default) but I have tried everything and there is no way.

What comes closest is with TFrame

  

self.style.configure ("TFrame", background = 'green')

But I only get the color in the first loan, when I change to another, it is gray.

Any suggestions?

Thanks

    
asked by chujalt 24.07.2018 в 19:56
source

1 answer

0

Go, solved.

The problem came at the beginning of the function of the second tab

class Volume(ttk.Frame):
 def __init__(self,name,*args,**kwargs):
   Frame.__init__(self,*args,**kwargs)

I have changed it to

class Volume(ttk.Frame):
 def __init__(self, main_window):
   super().__init__(main_window)

And now it works fine, the background color is on both tabs.

Thanks for everything and regards.

    
answered by 24.07.2018 в 20:30