How to match the width of the choice box's dropdown to the choice box

Hi there,
I'm using a ChoiceBox control. The choice box seems to be composed of two parts: the box(displaying the current selection) and a context menu(dropdown). What I find strange is that the dropdown of the choice box(the context menu) has different size than the choice box by default:
http://manvox.com/javafx1.3/choice-box-dropdown.jpeg
I can style the choiceBox's box element by modifying the +.choice-box+ CSS selector. I can also style the dropdown using the +.context-menu+ and +.menu-item+ selectors.
How can I ensure that the dropdown has the same size of it's parent choice box and is aligned to it?

@alabala: Please, if you can spare a few minutes, can you file a bug report for this at the JavaFX Jira issue tracker here: http://javafx-jira.kenai.com
If you set the 'project' to 'runtime', and 'component' to controls, it'll end up on my desk and I'll get the owner of the ChoiceBox control to take a look at it.
Thanks,
-- Jonathan

Similar Messages

  • How can I adjust the width of email display so text remains within the width of display

    Most emails are narrow enough to fit within the width of my display, occasionally I receive an email that spills of the edge of my screen and I need to move focus of my display back & firth with every line, is there a way to display in word wrap.?

    You can set the width of the word wrap in about:config. Get to about:config from Options > Advanced > General > Config Editor. Search for "wrap" and set mailnews.wraplength to whatever works for you. You should also set mail.wrap_long_lines to true.

  • Getting the width of a String, or centering it within the Applet.

    Hello,
    I want to get a String within the center of my 2D Applet, so I'm wondering if it's possible to get the width (and height) of the String in numbers, or even if it's possible to center like Microsof Word does. If one of the two is possible, please tell it me :)
    Thanks
    PS: I use fonts and a size for the font, could this create problems?
    Edited by: The_Pointer on Mar 27, 2009 3:34 PM
    Edited by: The_Pointer on Mar 27, 2009 3:34 PM

    Can someone explain the
    Graphics.getFontMetrics()
    x = (Component.getWidth() - Fontmetrics.stringWidth()) / 2 a little bit more please?
    Since I get the following errors
    C:\Documents and Settings\Robert van der Pijl\Bureaublad\Clock\clockApplet.java:66: non-static method getFontMetrics() cannot be referenced from a static context
              Graphics.getFontMetrics();
                      ^
    C:\Documents and Settings\Robert van der Pijl\Bureaublad\Clock\clockApplet.java:67: x is not public in java.awt.Component; cannot be accessed from outside package
              x = (Component.getWidth() - Fontmetrics.stringWidth()) / 2;
              ^
    C:\Documents and Settings\Robert van der Pijl\Bureaublad\Clock\clockApplet.java:67: non-static method getWidth() cannot be referenced from a static context
              x = (Component.getWidth() - Fontmetrics.stringWidth()) / 2;
                            ^
    C:\Documents and Settings\Robert van der Pijl\Bureaublad\Clock\clockApplet.java:67: cannot find symbol
    symbol  : variable Fontmetrics
    location: class clockApplet
              x = (Component.getWidth() - Fontmetrics.stringWidth()) / 2;
                                          ^
    4 errors

  • Multiple Choices in either Dropdown list or List box

    I'm working on a form which will need to be reviewed and accepted by multiple people. I'd like to have a dropdown list or list box with all the known names of those reviewing, where all names can be selected, one by each reviewer so eventually all names will be picked, and the form approved.
    Open to any help I can get. This is new territory for me. Thanks in advance,
    gb

    err... should it be allowed to deselect?
    If yes I'd do it with checkboxes, if not I'd do it with a dropdownlist that populates calculated Textfields.
    Though there already was a solution for multiple selections of a dropdownlist in the past... I'll search it, if you want.
    Any more requirements? (F.ex. should the next user be not able to see who has already had it?)

  • Text wrap for a paragraph: How to define the width of a Text box /  active text area? I simply need a longish text to wrap within the frame!

    Hello, I've been searching for a good while in the forums now, but have found no solution or real mention of the problem – I hope some of you can help.
    I want to very simply layout a text between scenes, a slightly longer text that wraps within the frame margins. Here's an example of how I want it to look:
    Now, I couldn't for the life of me get the Custom Text to behave like that, as there are no parameters to set for the width of the text area. The Text Size, yes, along with the Tracking, Baseline and all that, but the width of the text box, no. The above was created by customizing one of the other Text Generator presets that happened to be left aligned.
    However, this preset has a fade in/fade out transition, which I do not want. There's no way to remove this transition as it seems integrated into the Text Generator (meaning they are not really presets, but separate kinds of Text objects? Very silly.)
    So I am asking you: Is there any way to get the Custom Text generator to behave like that? Just a text paragraph as above. Below you'll see all I can manage with the diffferent Custom Text parameters. Any kind of repositioning and resizing of the text just changes the position and size of the frame – but the actual text items are just cropped off where they extend out of that frame. Apparently the bounding box for the text is just some default length, and I can't find any way to adjust the width. See below my different attempts.
    The same text pasted into a Custom Text generator clearly extends outside the frame:
    Here Transform just moves – or resizes – the video frame that the Text Box exists inside:
    The Crop gives similar results, and of course Distort doesn't get me closer to what I need, either. There should be simply a Text Box Width parameter to set somewhere, but if it exists they have hidden it very well. How do you do it?
    Thanks for any help, this is a silly problem, but one of now many trivial problems that amount to me growing quite dissatisfied with FCPX. Hopefully I've just overlooked something.
    All the best,
    Thomas

    Thomas...same kind of crap here.
    I used Custom Text - entered a sentence, hit return, entered another.
    Set to 72 pt.
    The default alignment is centred - I want left aligned text...the text start point stays at the centre of frame and the sentence runs off the edge of the bounding box.
    There is no settings in the Text or Title inspector dialog to correct that!
    Using Transform will not sort it!

  • How do I change the width of column "rating"

    all columns are variable in widht. but not "rating" (stars). How do I change the width of column "rating"?

    Hi Emkaha,
    By the way the column "last played" can be reduced to a size which display the date "incorrect" as well (you'll see only the first number of the date which wouldn't make any sense too, but it is possible).
    True, but if you see date of "1" you will know you are not seeing a full date.  If you see 2 stars, it is a valid value, even if it is not correct.  At least, that is my supposition about why it is designed the way it is.
    Having said that, the extra width in the German version -- the Wertung column is wider than needed for 5 stars -- does seem odd.  In the English version for Windows PC, the Rating width is just enough for 5 stars.  You can report this to Apple via the iTunes Feedback page.

  • How to increase the width of Panel Tabbed layout

    How to increase the width of detailed items of a Tabbed Panel ? I have many columns inside a detailed item of tabbed panel i can see only 3 colums ,to see the rest of the column i need to scroll. I tried to set the width but doesnt seems to be working
    <af:panelTabbed id="pt2" inlineStyle="width:800.0px;">
    <af:showDetailItem text="Interview" id="sdi1"
    inflexibleHeight="50"
    inlineStyle="width:800px; border-color:Aqua; border-width:thin;"
    styleClass="AFStretchWidth">
    Is there any way to increased the width of showDetailItem of panelTabbed ?
    Thanks

    Make sure the stretchChildren property of the shoDetailItem is set to first.

  • How to change the width of the variable screen?

    Hi
    like in the subject mentioned i need to know how i can change the width of the variable screen....
    right now i have to scroll if i want to see the right part auf the variable screen...
    maybe i can change the width with css?

    Hi,
    Using CSS specify the table width for the variable screen and include the Css in the header section of the table.

  • How can I change the width of bookmark toolbar buttons?

    I would simply like to alter the width of bookmark toolbar buttons to better display the bookmark title. I also have MultirowBookmarksToolbar addon installed.

    Add code to [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    </nowiki></pre><pre><nowiki>#personal-bookmarks toolbarbutton.bookmark-item { max-width: 20em; }</nowiki></pre>
    You can use this code for specific bookmarks (label name needs to be an exact, case sensitive, match)
    <pre><nowiki>#personal-bookmarks toolbarbutton.bookmark-item[label="Bookmark_Name"] { max-width: 20em; }</nowiki></pre>
    See http://kb.mozillazine.org/Editing_configuration

  • How change the width of line programmetically

    Hi all!
    I have a problem. Please guide me how it can be handled? The Problem is:-
    I want to change the width of a line programmatically when I press the button.
    Waiting for an urgent response.
    Thanks
    BASIT ALI KHAN

    What kind of line?
    You can create a line with a text_field that has a small height (1) and then use the set_item_property to change its width.

  • How to get the width of a numeric field at runtime

    Hi, everyone :D
    Is there a built-in that let me get the width of a numeric field at runtime? The SRW bulit in only has the SWR.GET_PAGE_NUM built-in. Is there something like the Get_item_property of Forms IN Report?
    Thanks
    Edited by: user12422762 on 07-ene-2010 14:16
    Edited by: user12422762 on 07-ene-2010 14:30
    Edited by: user12422762 on 08-ene-2010 4:40
    Edited by: user12422762 on 08-ene-2010 4:50

    Hi. Thanks for answering. I need the width because i want to set the format of the field at runtime. The quantity of decimal digits for all the numeric fieds in the report is received as a parameter.
    I can use a function to create the respective decimal mask ('D99,'D999',etc.) and then call the SRW.SET_FORMAT_MASK in the format trigger of every single field, but i'd have to type the mask of the integral part of the number in the code of the trigger ('99G999D99, '999G999G999D'). However, If i could get the width, i'd just create a function and call it from every format trigger.
    Edited by: user12422762 on 08-ene-2010 10:05
    Edited by: user12422762 on 08-ene-2010 10:06
    Edited by: user12422762 on 08-ene-2010 10:08

  • How to change the width of ABAP editor...???

    Hi all,
            Can anyone let me know to inc+/dec- the width of coding span of ABAP editor.?
    Thanks & Regards,
    Rajeev

    Hi,
    You can not change the width of ABAP editor, You can only change the compatibility because the older ABAP editor only supports 72 char length, so in your new ABAP editor you can go to utilities->ABAP EDITOR->EDITOR and check the "Downward-Compatible line length(72)" .

  • How to change the width of textbox in Search Texts iview

    Hi, Experts,
         I creat a search texts iview with stardard configuration to search the data in the repository.
    The problem is that the width of textbox is too short. And the user will input more than 40 characters in the textbox.
       In this way, the users can't see all the information unless he put the mouse pointer in the textbox and drag it.
       Is there any stardard configuration in MDM or MDM Portal to increase the width of textbox?
      Regards,
      Youli

    Hi Youli,
    I tried this but seems like there is no property available to change this setting. As these iViews are standard shipped, we cannot modify the design or code.
    Regards,
    Jitesh Talreja

  • How to avoid that the last column in a datagrid increase the width out of the window?

    I have a datagrid with this configuraction:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}"/>
    </DataGrid.Columns>
    The last column is a description, so the text can be a bit large. so I would like that the width don't be wnough greater than makes the datagrid has a width out side the window.
    For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    The code that I have used in this case is:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    I am using visual studio community edition and wpf 4.5.1.
    Thank so much,

    >>For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    Can't you just set an explicit width for the first two columns then?, e.g.:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    There is also a MinWidth property that you can use to prevent the columns from being to narrow:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • How to increase or decrease the width of af:inputText

    Hi,
    I want to increase the height & width of the <af:inputText>.
    To increase the Height, i made rows attribute value as "2". But i am not able to increase the width of that component.
    I have increased the "style--> box ---> Width” but it is not working.
    Please help me,
    Thanks in advance.

    Hi user,
    Post your ADF faces questions at
    JDeveloper and ADF
    --Prasanna                                                                                                                                                                                                                                   

Maybe you are looking for