New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to hide/show/delete tabs from tabbedFrame #333

Closed
jarvisteach opened this Issue Jan 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jarvisteach
Copy link
Owner

jarvisteach commented Jan 2, 2018

As mentioned in #332 - should be possible to hide/show/delete tabs from tabbedFrame.


def deleteTab(frameName, tabName):
    print(tabName)
    tabs = app.widgetManager.get(app.Widgets.TabbedFrame, frameName)

    tab = tabs.widgetStore[tabName][0]
    tab.pack_forget()
    tab.destroy()
    pane = tabs.widgetStore[tabName][1]
    pane.grid_forget()
    pane.destroy()

    del tabs.widgetStore[tabName]

    # to clean up the selected/highlighted tabs
    if tabs.highlightedTab == tabName:
        tabs.highlightedTab = None

    if tabs.selectedTab == tabName:
        tabs.selectedTab = None
        for key in list(tabs.widgetStore.keys()):
            if not tabs.widgetStore[key][0].disabled:
                tabs.changeTab(key)
                break

     tabs._TabbedFrame__colourTabs()

@jarvisteach jarvisteach added this to the 1.0 milestone Jan 2, 2018

jarvisteach added a commit that referenced this issue Jan 2, 2018

Work on tabbed frame
Modded tabbed frame to work with ttk - required makerFunction #189
Added function to delete tabs #333

Change to setFonts functions #324
Updated docs

jarvisteach added a commit that referenced this issue Feb 13, 2018

Simple attempt at hide/show tabbed frame #333
Works, but grids the tab at the end.

Will need to change to grid layout to resolve.

jarvisteach added a commit that referenced this issue Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment