cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.32k stars 71 forks source link

hide tabs item #863

Open ddkwork opened 5 months ago

ddkwork commented 5 months ago

Describe the feature

tab item can be hide

screenshots

Relevant code

func main() {
    //icons.AddFS()
    gi.TheApp.SetIconBytes(icon)
    b := gi.NewBody("fleet")

    tab := gi.NewTabs(b)
    tab.NewTab("issue").OnClick(func(e events.Event) {
        //To determine whether it is currently shown or hidden, switch the status here
    })
}
kkoreilly commented 5 months ago

I will look into this.

ddkwork commented 4 months ago

I will look into this.

This will save space on small screen computers, but should enlarge the parent control where the tab is located after the hiding operation