Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Can I find what CTabItem my Control is in?
icon5.gif  Can I find what CTabItem my Control is in? [message #534141] Tue, 18 May 2010 04:28 Go to next message
Eclipse UserFriend
After I've called tabItem.setControl(control), is there a way to find the tabItem given a reference to the control?
Re: Can I find what CTabItem my Control is in? [message #534149 is a reply to message #534141] Tue, 18 May 2010 04:40 Go to previous messageGo to next message
Eclipse UserFriend
When ever you have such doubts go into the code...

Go into CtabItem.setControl
in there you can see that control is a class level variable and it has a getter method....
Re: Can I find what CTabItem my Control is in? [message #534153 is a reply to message #534149] Tue, 18 May 2010 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Of course, I can get the control given the tab item. I am asking about going the other way.
Re: Can I find what CTabItem my Control is in? [message #534158 is a reply to message #534153] Tue, 18 May 2010 05:10 Go to previous messageGo to next message
Eclipse UserFriend
What I can do is iterate over folder.getItems(), and check for each item if it holds my control.
Re: Can I find what CTabItem my Control is in? [message #534558 is a reply to message #534158] Wed, 19 May 2010 10:24 Go to previous message
Eclipse UserFriend
Alexey Romanov wrote:
> What I can do is iterate over folder.getItems(), and check for each item
> if it holds my control.
That makes sense bcoz a control can be shared by multiple tab-items, so
I think the preferred way would be to iterate through them and find the
1st tab-item that contain the control.
Previous Topic:How to print a whole big Tree widget
Next Topic:[INFO]When you dont get response to your posts.
Goto Forum:
  


Current Time: Sun Aug 31 09:56:48 EDT 2025

Powered by FUDForum. Page generated in 0.04123 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top