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

Changing icon dynamically does not work for tabs #1501

Open
tdltdl opened this issue Nov 3, 2018 · 3 comments
Open

Changing icon dynamically does not work for tabs #1501

tdltdl opened this issue Nov 3, 2018 · 3 comments
Assignees
Labels
type: bug Something isn't working

Comments

@tdltdl
Copy link

tdltdl commented Nov 3, 2018

Environment

  • Platform version: 6.10.3
  • Client type: Web
  • Browser: Chrome

Description of the bug or enhancement

On a generic UI, add a tabsheet with one tab and a button.
in the postInit() of the controler do something like:

HasIcon btnIcon = (HasIcon) button;
btnIcon.setIconFromSet(CubaIcon.BOOKMARK);
HasIcon tabIcon = (HasIcon) tab;
tabIcon.setIconFromSet(CubaIcon.BOOKMARK);

Expected result: both the tab and the button has the "bookmark" icon.
Current result: Only the button get's the bookmark Icon

If I set an icon from the Studio (ex question mark), the tab shows the question mark icon but not the bookmark, so looks like it is not updated.

@jreznot jreznot added the state: incomplete Further information is requested label Nov 5, 2018
@jreznot
Copy link
Contributor

jreznot commented Nov 5, 2018

Hi,

Could you please attach a demo project that illustrates the issue or at least the complete UI controller class?

@jreznot jreznot added this to the Release 6.10 milestone Nov 5, 2018
@jreznot jreznot self-assigned this Nov 5, 2018
@tdltdl
Copy link
Author

tdltdl commented Nov 6, 2018

Here is a minimal project to reproduce it with a hack to have the icons updated
icon.zip

Changing the icon does not seem to refresh the display (nor in the postinit, nor in reaction to a button click). Removing and adding back the tabs to the tabsheet does show the correct icon though.

Thanks for your help and your reactivity!

@jreznot jreznot added client: web type: bug Something isn't working and removed state: incomplete Further information is requested labels Nov 6, 2018
@jreznot jreznot changed the title Changin icon dynamically does not work for tabs Changing icon dynamically does not work for tabs Nov 6, 2018
@jreznot
Copy link
Contributor

jreznot commented Nov 16, 2018

Unfortunately, it is not that easy to fix this without breaking backward compatibility.

For now you can use Tab API to change icon dynamically:

tabSheet.getTab("tab1").setIconFromSet(CubaIcon.ANDROID);
tabSheet.getTab("tab2").setIconFromSet(CubaIcon.WIFI);

@jreznot jreznot modified the milestones: Release 6.10, Release 7.0 Jan 28, 2019
@jreznot jreznot assigned Flaurite and unassigned jreznot Jan 28, 2019
@Flaurite Flaurite modified the milestones: Release 7.0, Some Day Feb 5, 2019
@knstvk knstvk removed this from the Some Day milestone Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants