• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Combobox popup position

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a situation where a ComboBox is positioned near the bottom of my window. The box is editable and drills down a set of results that match the text typed by the user. If the user has the window full screen and the popup contains more than a few items it would run off the bottom of the screen but the skin that controls the popup calls setAutoFix(true) so the popup is repositioned to remain entirely on the screen. Unfortunately this means it is positioned over the text field so users can't see what they're typing!

I got around this by overriding ComboBoxListViewSkin as follows:




and setting that class as skin for my ComboBoxes in the css file:



However this results in the popup ALWAYS covering part of the text field, and not properly aligned in any way.

Does anyone know a way around this? So far I think my options are:

1. Limit the visible rows in the popup to about 3 (any more causes repositioning).
2. Major overriding of ComboBoxPopupControl, to take control of positioning the popup myself. However I've done similar things in the past and it's come back to bite me as we're moving from Java 7 to Java 8 and changes in the non-public api mean I had to rewrite stuff.
3. Write my own component from scratch

Thanks for any help
Jon

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic