Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disable keyboard-control of tabpane (maybe a bug in JavaFX 2.0)

 
Marc Berger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

I'm new here and posting here because I found no solution to my problem so far and I think it might be a bad bug in JavaFX 2.0. I'm using a TabPane in my JavaFX-Application and many tabs should be disabled from the start of the app. Later when the user has changed specific settings the tabs should be enabled one at a time. I disabled the tabs at the start of the app with the disabled-property. This works all good. However at the moment I type the "left"- or "right"-key on the keyboard I can visit the disabled tabs and they are getting enabled one at a time. I really don't know why oracle has thought this would be a good idea, but currently it gives me headaches. I hope you guys know an elegant way to disable this annoying keyboard-control of the tabpane.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marc, welcome to CodeRanch!

Can you post the relevant snippet of the code where you have disabled them and also can you post the screenshot of the tabs when they get enabled when you use the arrow keys to navigate?
 
Marc Berger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course.

Here I create the tabs and disable them:



Before pressing the "right"-arrow key:



After pressing the "right"-arrow key:


 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marc,
I tried a similar example in JavaFX 8 and I don't see the problem. If it is possible to upgrade to 8 and try, you should give it a shot.

Otherwise, would need a SSCCE to try and reproduce the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic