Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Selection Listener on TabFolder executing five times on each click?
Selection Listener on TabFolder executing five times on each click? [message #901576] Mon, 13 August 2012 09:38
Michael Dougherty is currently offline Michael Dougherty
Messages: 8
Registered: July 2012
Junior Member
I want to add a listener that does something when you change tabs with the selection listener.

I am doing something where if you edit something on a tab and don't save, if you attempt to change tabs it will stay on the original tab (I did this by getting the current Tab and resetting it to that one after you change) and a pop up comes up telling you to save or cancel your changes.

I realized however that this popup was coming up FIVE times in a row when you changed tabs, and with a println statement I see that for some reason it goes into the selection listener five times? Why is this and how can I fix it?
Previous Topic:StyledText location at offset on word wrap problem
Next Topic:Maximum width of a control?
Goto Forum:
  


Current Time: Fri Aug 29 22:20:48 EDT 2014

Powered by FUDForum. Page generated in 0.09328 seconds