| SWT List Selection [message #629001] |
Sat, 25 September 2010 15:51  |
larsk Messages: 22 Registered: October 2009 Location: Sweden |
Junior Member |
|
|
I have added a SelectionListener to a SWT List to know when the selection has changed.
But how do I know what was selected before this new selection? Is there any way to get that information?
Edit: If figured it out. Don't know why I didn't figure it out from the beginning. I just stored the List's selection to another variable that I checked the next time I selected the List.
[Updated on: Sat, 25 September 2010 16:21] Report message to a moderator
|
|
|
| Re: SWT List Selection [message #629087 is a reply to message #629001] |
Mon, 27 September 2010 03:15  |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 25.09.2010 21:51, larsk wrote:
> I have added a SelectionListener to a SWT List to know when the
> selection has changed.
> But how do I know what was selected before this new selection? Is there
> any way to get that information?
You have to administrate a selection history by yourself.
Why do you not query the initial selection after the creation
of the widget? Typically you will also intentionally set a
specific initial selection, this is the right place where you
could start with your history.
HTH & Greetings from Bremen,
Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.01688 seconds