Open Kurou-kun opened 1 year ago
Currently there is no option for this, but could be a good enhancement.
So if there is no option for it, is there any workaround to hide these buttons?
u can get the button like this. try to do grid.froget()
=> self._tab_dict to get the CTKframe create by .add function.
When you click on button, call grid_forget() for button and frame about tabview with this var. this is dict var [STR, WIDGET]. and call your new frame with grid().
self.test=CTkTabview(self)
self.test.grid()
self.add=self.test.add("test")
print(self.test._segmented_button._buttons_dict)
@Kurou-kun you can do it like this, but this method can stop working with any new update:
tabview._top_spacing = 0
tabview._top_button_overhang = 0
tabview._segmented_button.grid_forget()
tabview._configure_grid()
@TomSchimansky I tried to use what you showed but those navigation buttons are still there. Maybe it doesnt work becouse i use .pack() method?
My entire code for notebook: (these with xx_tab() are functions from another file in which is content of every tab)
# Content
self.window.content = ct.CTkTabview(master=self.window, corner_radius=0, fg_color="grey15")
self.window.content._top_spacing = 0
self.window.content._top_button_overhang = 0
self.window.content._segmented_button.grid_forget()
self.window.content._configure_grid()
self.window.content.pack(fill="both", side="right", expand=True)
assistance_tab(self.window.content, color_accent)
visuals_tab(self.window.content, color_accent)
players_tab(self.window.content, color_accent)
vehicles_tab(self.window.content, color_accent)
miscellaneous_tab(self.window.content, color_accent)
settings_tab(self.window.content, color_accent)
Image:
https://github.com/Mr-G254/Media-Player-Desktop-App --run the mediaplayer.py file and check the first page.
I want to hide those buttons becouse i've made different one in different place to operate the CTkTabView. I couldn't find any info about it in documentation or issues.
This is my CTkTabView: