Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Previous Tab in TabFolder and SelectionEvent
Previous Tab in TabFolder and SelectionEvent [message #21310] Wed, 02 May 2007 16:49 Go to next message
Eclipse UserFriend
Originally posted by: roberto.sanchez.autonomind.com

Hi all, I'm using a TabFolder with multiple tabs to input data from
user, I store all data in an object and when user clicks on "Save" this
object save all data in MySQL, Well, my problem is:
I would like (for several reasons) to send current tab data to my object
every time user change the selected tab, Is there any automatic way to
get the previous tab selected ? I can do it manually saving the current
tab and so on, but if there is a better way...

On the other hand, I change the selected tab from code in several
situations, using:

tabfolder.setSelection(newTab);

But, in this case a Selection Event is never fired, Is this the correct
behaviour ?

Regards.
Roberto.
Re: Previous Tab in TabFolder and SelectionEvent [message #21559 is a reply to message #21310] Wed, 02 May 2007 18:55 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Hi Roberto,

there is no way to obtain the previously selected tab, except for
keeping track of the selection yourself as you already mentioned.

Regarding the SelectionEvent, it is correct behaviour. SWT fires it when
the first TabItem is added (and automatically selected), but changing
the selection programmatically does not cause a SelectionEvent.

Cheers
Rüdiger

Roberto Sánchez wrote:
> Hi all, I'm using a TabFolder with multiple tabs to input data from
> user, I store all data in an object and when user clicks on "Save" this
> object save all data in MySQL, Well, my problem is:
> I would like (for several reasons) to send current tab data to my object
> every time user change the selected tab, Is there any automatic way to
> get the previous tab selected ? I can do it manually saving the current
> tab and so on, but if there is a better way...
>
> On the other hand, I change the selected tab from code in several
> situations, using:
>
> tabfolder.setSelection(newTab);
>
> But, in this case a Selection Event is never fired, Is this the correct
> behaviour ?
>
> Regards.
> Roberto.
Previous Topic:RAP Questions
Next Topic:GWT vs RAP Benchmark
Goto Forum:
  


Current Time: Thu Apr 25 13:06:24 GMT 2024

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

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

Back to the top