• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:


 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic