1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default [CLOSED] ComboBox height

    [CLOSED] ComboBox height


    Env : Windows XP, GXT 1.0beta3, IE 6, FF2/3
    In most cases, there is an issue with combo box height. The field height is bigger than the expand image. You can reproduce the bug with the code :
    Code:
        public void onModuleLoad() {
            Viewport viewport = new Viewport();
            final FormPanel panel = new FormPanel();
            panel.setHeading("Form panel");
            panel.setWidth(400);
            final ComboBox combo = new ComboBox();
            combo.setFieldLabel("File");
            panel.add(combo);
            viewport.add(panel);
            RootPanel.get().add(viewport);
        }
    If I add
    Code:
    combo.setHeight(21);
    it has no effect.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Yout cannot change the height of the Combo. I do not see any issues with ComboBox. If what you describe occurs, it is a bug. Please post some test code and a screenshot.

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default


    I can still reproduce the bug in hosted mode with beta4 with the same code. I don't modify the height. Take a look at the screenshot.
    Code:
        public void onModuleLoad() {
            Viewport viewport = new Viewport();
            final FormPanel panel = new FormPanel();
            panel.setHeading("Form panel");
            panel.setWidth(400);
            final ComboBox combo = new ComboBox();
            combo.setFieldLabel("File");
            panel.add(combo);
            viewport.add(panel);
            RootPanel.get().add(viewport);
        }
    Attached Images

  4. #4
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    +1

    Since beta4, I am facing the same issue with my code in hosted mode, looks exactly like zaccret's screenshot. I think this is related to the style sheet. Some text now appears unnaturally larger than before, most noticably in the ComboBox and TextFields.

    The screenshot below shows that behavior. Prior to beta4, the font size/style of the TextFields/Labels/ComboBoxes was like the the Text that says "Vorhandene ..." on the lower-hand side.

    Darell, could you please have a look at why this might be?

    Thanks a lot,

    Joachim
    Attached Images

  5. #5
    Ext User
    Join Date
    Apr 2008
    Location
    Munich, Germany
    Posts
    43
    Vote Rating
    0
    flow is on a distinguished road

      0  

    Default


    +1
    GWT 1.5 RC
    GXT Beta 5
    Hosted

    The TextField of the TriggerField "ComboBox" seems to consume slightly more height than it should.
    Furthermore, the LabelField's text is not vertically centered.

    Code:
    public void onModuleLoad() {
            final Viewport v = new Viewport();
    
            // FormPanel of Product-Properties
            final FormPanel formPanel = new FormPanel();
            formPanel.setHeading("Large Combobox");
            formPanel.setFieldWidth(200);
            formPanel.setLabelWidth(200);
            formPanel.setLabelAlign(LabelAlign.RIGHT);
            formPanel.setBorders(false);
            formPanel.setFrame(true);
            formPanel.setWidth(500);
    
            final Field<String> prodIdSelectionField = new TriggerField<String>();
            prodIdSelectionField.setFieldLabel("id");
            prodIdSelectionField.setEnabled(false);
            prodIdSelectionField.setReadOnly(true);
            formPanel.add(prodIdSelectionField);
    
            final LabelField label = new LabelField();
            label.setFieldLabel("Date");
            label.setText("06/12/08");
            formPanel.setStyleAttribute("padding", "10px");
            formPanel.add(label);
    
            v.add(formPanel);
            RootPanel.get().add(v);
        }
    Attached Images

  6. #6
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default


    Well, if I omit the HTML 4.01 Transitional DOCTYPE declaration in the HTML main file (passing to Quirks mode) : the result is better on IE6 and is perfect on FF.
    So we should first state here http://extjs.com/forum/showthread.php?t=38334

  7. #7
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    I think the changes induced by beta3 were that the styles .x-form-field and
    .x-form-item are now font-size: 12px wheras they previously were 11px.

    Personally, I would very much appreciate if they could be set back to 11px. Then they are consistent with e.g. the way the "Text" item is rendered.

  8. #8
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    Actually, the defining the font size smaller as pre-beta3 doesnn't solve the combo box selector not aligned problem...

  9. #9
    Ext User
    Join Date
    Apr 2008
    Posts
    1
    Vote Rating
    0
    Kevin Ott is on a distinguished road

      0  

    Default


    I've encountered this problem as well. I noticed that the stylesheet of the explorer demo adjusts the top by -1 to align the input with the expander.

    Code:
     
    /* Rule 2 of http://extjs.com/explorer/Resources.css */
    .ext-ie .x-form-text { POSITION: relative; TOP: -1px}
    This css hack seems to make the problem go away for me.

    Code:
     
    .ext-ie .x-form-text {
        margin: 0px;
        height: 18px;
        font-size: 11px;
        position: relative;
        top: -1px
    }

  10. #10
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Good catch Kevin. The CSS belongs in the core GXT CSS. With the current code, if you do not import the Resources module, the alignment will be off 1 px in IE. I have moved the style from Resources module into the core CSS. Change is in SVN.