Search code examples
swtctabitem

SWT: How to redisplay new contents of a CTabItem


I have a CTabFolder with one of its CTabItems which may change its contents on a given user action. But I don't know how to force the display once the contents have changed. I get the tab item blank; if I resize the window suddenly everything appears.

I'm not posting the code because I did some wrapping in Scala, but this is basically what I'm doing:

  • The CTabItem has a ScrolledComposite, set with setControl()
  • The ScrolledComposite contains a Composite
  • everything else is under this Composite

    When the contents need to be changed, I take the existing CTabItem object, set it to a new ScrolledComposite, with a new Composite, from which hangs the new contents.

    Calling redraw() and update() on the CTabFolder object doesn't do it... What should I do? Thanks


  • Solution

  • Have you tried calling layout()?