Skip to main content



      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 12: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 14:55 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 18:59:46 EDT 2025

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

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

Back to the top