user816526
user816526

Reputation: 25

How do I show a table inside a CTabItem using the SWT

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?

Upvotes: 2

Views: 979

Answers (2)

Tom Seidel
Tom Seidel

Reputation: 9535

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

Upvotes: 1

Frettman
Frettman

Reputation: 2271

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

Upvotes: 1

Related Questions