Skip to content
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

SelectTab method does not in all cases correctly set the blue underline to the selected tab #1872

Closed
midu-SA opened this issue Jan 27, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@midu-SA
Copy link

midu-SA commented Jan 27, 2021

Describe the bug:

Remove the last tabitem of a tab-container, then add a new tabitem and select it as the currently selected tab. The blue underline remains on the previous tabitem

To Reproduce:

Steps to reproduce the behaviour: run the example code

Example code:

package main

import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/container"
)

var del_button *widget.Button

func main() {
var container_tab *container.AppTabs
a := app.New()
w := a.NewWindow("container")

del_button = widget.NewButton ("delete", func() {
container_tab.Remove (container_tab.CurrentTab())
item := container.NewTabItem("Delete", make_delete_container() )
container_tab.Append(item)
container_tab.SelectTab (item)
})

container_tab = container.NewAppTabs(
container.NewTabItem("List", widget.NewButton ("list", func() {})),
container.NewTabItem("Delete", make_delete_container()),
)
container_tab.SelectTabIndex(0)
w.SetContent (container_tab)
w.ShowAndRun()
}

func make_delete_container () *fyne.Container {
return fyne.NewContainerWithLayout(layout.NewMaxLayout(), del_button)
}

Device (please complete the following information):

  • OS: Linux
  • **Version:**Debian 10
  • Go version: 1.15.6
  • Fyne version: 2.0
@midu-SA midu-SA added the bug Something isn't working label Jan 27, 2021
@AlbinoGeek
Copy link
Contributor

AlbinoGeek commented Jan 27, 2021

Hey there!

Thank you for reporting this bug.


You can format code by placing it within backticks:

```go
This is a code block
```

This is a code block

@andydotxyz
Copy link
Member

Fixed on develop branch for next v2.0.1 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants