Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TabItem
TabItem [message #466483] Tue, 10 January 2006 12:34 Go to next message
Eclipse UserFriend
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] Tue, 10 January 2006 23:34 Go to previous messageGo to next message
Eclipse UserFriend
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 15:33 Go to previous message
Eclipse UserFriend
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 Jul 02 16:44:06 EDT 2025

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

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

Back to the top