• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single interval selection in two lists

 
michael delta
Ranch Hand
Posts: 35
Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have these Lists:



I add these lists on the same panel, moviesPane. How is it possible to be able select (or have highlighted) only one movie,dvd OR blueray?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Listen to selection events. On selection call clearSelection() on the other list.
 
michael delta
Ranch Hand
Posts: 35
Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the response.

I did this:



Doesnt seem to work though...any ideas?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change to
 
michael delta
Ranch Hand
Posts: 35
Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also had to write:

if(e.getSource()==dvdList.getSelectionModel())


Thank you so much for this!!
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
michael delta wrote:I also had to write:

if(e.getSource()==dvdList.getSelectionModel())


Well done
Shame on me. I did not notice it! Duh!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic