Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TabItem
TabItem [message #466483] Tue, 10 January 2006 17:34 Go to next message
JavaJ Missing name is currently offline JavaJ Missing nameFriend
Messages: 45
Registered: July 2009
Member
Hey all. i have 2 TabFolders on my screen and each have 3 tabs. "One", "Two", "Three". I'm looking for a way that when a user clicks on either TabFolder TabItems the other TabFolder's equivalent TabItem will be selected as well. So if i click on "One", both "One" tab items appear in their separate TabFolders. How can i accomplish this?
Re: TabItem [message #466531 is a reply to message #466483] Wed, 11 January 2006 04:34 Go to previous messageGo to next message
Joseph Rignanese is currently offline Joseph RignaneseFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Jason,

I would use the TabFolder.getSelection (or getSelectionIndex) to determine
which TabItem is selected and then use the TabFolder.setSelection on the
other TabFolder.
Then add listeners to all the TabItems which triggers the code when a
TabItem is selected.

You can either use the TabItems Text property (getText, setText) to do the
comparison, or if the TabItems have the same indexes simply use the index.

Joe


"Jason Milliron" <jm1468@ameritech.net> wrote in message
news:5581948.1136914509172.JavaMail.root@cp1.javalobby.org...
> Hey all. i have 2 TabFolders on my screen and each have 3 tabs. "One",
> "Two", "Three". I'm looking for a way that when a user clicks on either
> TabFolder TabItems the other TabFolder's equivalent TabItem will be
> selected as well. So if i click on "One", both "One" tab items appear in
> their separate TabFolders. How can i accomplish this?
Re: TabItem [message #466587 is a reply to message #466531] Wed, 11 January 2006 20:33 Go to previous message
JavaJ Missing name is currently offline JavaJ Missing nameFriend
Messages: 45
Registered: July 2009
Member
Thanks Joe, helped out a lot. But this: "Then add listeners to all the TabItems which triggers the code when a
TabItem is selected." wasn't right. There is no selection listener for the TabItems so i just added a selection listener to the TabFolder. Thanks again for all your help.

Later,
J
Previous Topic:sort redraw problem 8-(
Next Topic:how to add SWT Widgets in Table Cell
Goto Forum:
  


Current Time: Wed Apr 24 21:21:10 GMT 2024

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

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

Back to the top