Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Posts
    21
    Vote Rating
    0
    aaronbartell is on a distinguished road

      0  

    Default ComboBox dropdown placement

    ComboBox dropdown placement


    I have a weird issue happening. I have a ComboBox defined, and when I click to expand it, the drop down portion shows in the very left/top portion of the browser window - looks like it is getting set to x=0 and y=0 concerning it's placement. See below screenshot for an example.

    extjs_combobox_dropdown_placement.png

    Here is the FormPanel definition:
    PHP Code:
        var fp5xGen = new Ext.form.FormPanel({
            
    id:'fp5xGen',
            
    frame:true,
            
    hidden:true,
            
    layout:'anchor',
            
    padding:'5',
            
    layoutConfig:{},
            
    title:'Section 5.A.x',
            
    buttonAlign:'center',
            
    items:[
              {
                  
    id:'hlpTxt5xGen_1',
                  
    xtype'displayfield',
                  
    cls:'directionsText',
                  
    borderfalse
              
    },new Ext.Panel({
                  
    id:'fp5xGen.1',
                  
    layout:'table',layoutConfig:{columns:2},
                  
    items:[
                  {
                    
    id:'lblMBRNUM',
                    
    xtype:'label',
                    
    text:'Who?',
                    
    cellCls:'cellTop'
                  
    },new Ext.form.ComboBox({
                    
    id:'MBRNUM',
                    
    store:mbrPerStore,
                    
    valueField:'vfld',
                    
    displayField:'dfld',
                    
    emptyText:'Select an entry...',
                    
    triggerAction:'all',
                    
    editable:false,
                    
    width:130,
                    
    cellCls:'cellTop'
                  
    })]
                })
              ],
            
    buttons:[
              {
    id:'btnNext5AGen',text:'NEXT',handler:btnHandler}]
        }); 
    Any ideas?
    AaronBartell.com
    www.OpenRPGUI.com

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You could write a getListParent method for the ComboBox that returns the table cell instead of the document body.

  3. #3
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277
    Vote Rating
    9
    troseberry will become famous soon enough

      0  

    Default


    What is this? Perhaps this config is causing the issue.

    Code:
    cellCls:'cellTop'

  4. #4
    Ext JS Premium Member
    Join Date
    Nov 2009
    Posts
    21
    Vote Rating
    0
    aaronbartell is on a distinguished road

      0  

    Default


    Here is how cellTop is defined:
    PHP Code:
    .cellTop
    {
      
    vertical-aligntop;
      
    padding:2px 2px 2px 2px;

    Removing the cellCls property fixed the issue! I am guessing this is what Condor was alluding to also.

    AaronBartell.com

Similar Threads

  1. Placement of variable for use in combobox url
    By Tumac in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 7 Jul 2010, 3:44 PM
  2. Combobox DisplayField Templating on the Combobox same as Dropdown
    By CrazyEnigma in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 24 Jun 2010, 8:21 AM
  3. Replies: 1
    Last Post: 4 Feb 2010, 6:19 AM
  4. combobox dropdown off center
    By neenhouse in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 9 Jul 2008, 1:00 PM

Thread Participants: 2