tkinter 앱처럼 보이지 않는 tkinter 앱을 만들려고합니다. 나는 ttk 수첩을 사용하고 있으며, 탭을 선택하면 텍스트 주위에이 작은 점선이 탭에 나타납니다. 그것은 끔찍한 보이고, 나는 스타일이나 설정을 사용하여 그것을 제거하는 방법을 찾을 수 없습니다. 여기에 명확하게 스크린 샷입니다 : 코드에 대한Ttk 노트 탭 삭제하기 점선
편집 (나는 실제로 단지 기본 스타일 일을 제거하기 위해 노력하고있어 이후는, 정말 도움이 될 것입니다 생각하지 않습니다.) :
tab1 = ttk.Frame(tabs)
tab1_frame = ttk.Frame(tab1, style=style.Frame)
tab1_frame.pack(anchor='center', expand=1, fill='both')
# stick some widgets in
progress = ttk.Progressbar(tab1_frame, orient="horizontal", length=300, mode="determinate")
progress.grid(column=1, row=1, columnspan=2, padx=style.padding, pady=style.padding)
progress['maximum'] = 1000
progress['value'] = 500
# More widgets
# Another tab
tab2 = ttk.Frame(tabs)
tab2_frame = ttk.Frame(tab2, style=style.Frame)
tab2_frame.pack(anchor='center', expand=1, fill='both')
# blah blah
:에 충진
tabs = ttk.Notebook(mainframe, width=319, height=210, style=style.Notebook)
tabs.grid(column=0, row=1, sticky=('n', 'w', 'e', 's'))
tabs.columnconfigure(0, weight=1)
tabs.rowconfigure(0, weight=1)
: 여기
는 노트북 창조
관련 스타일 :
style_config = Style()
style_config.theme_use('default')
style_config.configure(self.Notebook,
background=self.dark,
borderwidth=0)
style_config.configure(self.Tab,
background=self.dark,
foreground='white',
padding=self.padding,
borderwidth=0)
style_config.map(self.Tab,
background=[('selected', self.color1)])
일부 코드가한다면 나도 몰라 내가 당신에게 –
도움이 도움이 될이 기본으로하기 때문에 방법은, 예를 배경으로 그것에게 동일한 색상을 그릴 수 있도록,이 초점 마크의 색상을 변경할 수 모든 테마 (기본값을 사용하고 있습니다)를 제거하려고합니다. 나는 내 대답을 업데이 트거야. – jstaab