[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Making a smaller ComboBox
From:       Jonathan Giles <jonathan.giles () oracle ! com>
Date:       2014-07-30 7:29:44
Message-ID: 53D89EE8.5070909 () oracle ! com
[Download RAW message or body]

More accurately, no one knows off-hand (and without absolute certainty) 
without looking in the code. If anyone should know, it is me, but I've 
been too bogged down to reassure myself that my gut feeling is correct. 
My gut feeling is that the gap is not settable because it is based on 
the width of the first x elements in the list. You'll find the answer in 
ComboBoxListViewSkin, if you are interested.

By default, if there is something you can't do (regardless of whether it 
is due to a lack of API or a lack of API understanding) there is no harm 
in filing a tweak request in Jira requesting the functionality. Either 
we'll respond with a pointer, or else we'll work on it as time permits.

-- Jonathan

On 30/07/2014 7:23 p.m., Mikael Grev wrote:
> So, I guess no one knows how to remove the gap between the text and the button in \
> ComboBox? 
> That probably means it’s a bug since padding can be removed from all sides except \
> for between the text and the button. 
> Cheers,
> Mikael Grev
> 
> 
> On 23 Jul 2014, at 16:11, Mikael Grev <grev@miginfocom.com> wrote:
> 
> > Hello all!
> > 
> > (FYI this question has also been asked here without any correct answers: \
> > http://stackoverflow.com/questions/24852429/making-a-smaller-javafx-combobox ) 
> > I'm trying to make a smaller version of the ComboBox but the gap between the text \
> > and the arrow button is constant no matter what I do. 
> > If I use the css:
> > 
> > .combo-box-base > *.arrow-button {
> > -fx-padding: 0 0 0 0;
> > -fx-background-color: pink, pink, pink, pink;
> > }
> > the arrow button gets smaller but the ComboBox itself still have the same size, \
> > only increasing the gap between the arrow and text to compensate. 
> > If I do
> > 
> > .combo-box > .list-cell {
> > -fx-padding: 0 0 0 0;
> > -fx-border-insets: 0 0 0 0;
> > }
> > The combo get a smaller height but the width remain fixed.
> > 
> > Is there any way to make the preferred size of the combo smaller by reducing the \
> > size between the text and arrow? 
> > I have a screenshot of the ComboBox attached.
> > 
> > Cheers,
> > 
> > Mikael Grev
> > 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic