2

This is probably a trivial question for most but here goes...

I am using SWT and want to show a table inside a CTabItem (or a TabItem if it's easier). I tried to create the table and use the CTabItem as the parent when doing so, however it doesnt accept this as a parameter (asking me to change CTabItem to Composite).

I figured there must be a way of showing a table inside a tab, I'm just not sure how to do it, can anyone point me in the right direction?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user816526
  • 25
  • 4

2 Answers2

1

You have to use the (C)TabFolder as parent instead. And on the (C)TabItem you have to call tabItem.setControl(yourTable).

Frettman
  • 2,251
  • 1
  • 13
  • 9
1

Howto put controls onto a tab see this snippet, use this as base and modify and replace a control with your table.

Tom Seidel
  • 9,525
  • 1
  • 26
  • 38