Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:28 Go to next message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
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 08:40 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
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....


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Can I find what CTabItem my Control is in? [message #534153 is a reply to message #534149] Tue, 18 May 2010 08:52 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
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 09:10 Go to previous messageGo to next message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
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 14:24 Go to previous message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
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 25 11:53:56 GMT 2019

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

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

Back to the top