user1109842
user1109842

Reputation: 23

using style attribute with ext.forms.combobox

am developing an application which its interface is mostly written in EXT.JS am having a trouble with ext.form.combo-box...am trying to adjust the style of the combo-box,but am not sure if the style attribute is valid and i can use it, i tried it but its not working for me,here is my code:

this.m_arriveByForm  = new Ext.form.ComboBox({
                id:             'trip-arrive-form',
                name:           'arriveBy',
                hiddenName:     'arriveBy',
        style:    {position:'relative', left:'12px'},   // style attribute i added
                fieldLabel:     this.locale.tripPlanner.labels.when,
                store:          this.m_arriveByStore,
                value:          this.m_arriveByStore.getAt(0).get('opt'),
                displayField:   'text',
                valueField:     'opt',
                anchor:         this.FIELD_ANCHOR,
                mode:           'local',
                triggerAction:  'all',

                editable:       false,
                allowBlank:     false,
                lazyRender:     false,
                typeAhead:      true,
                forceSelection: true,
                selectOnFocus:  true,

        });

it works when i add only one style rule, ut if i added more than one then it stops working, feel like ayntax error but can u help me in this?

Upvotes: 0

Views: 517

Answers (1)

Chau
Chau

Reputation: 5570

Have you tried using basic CSS formatting?

style: 'position: relative; left: 12px;'

instead of

style: { 
    position: 'relative',
    left: '12px'
}

Just my the end of the day idea.

You seem to want to adjust the position of the ComboBox and I would do that by configuring the layout of the component containing the ComboBox. But since you only show code concerning the ComboBox, I don't know if that solution will help you.

Upvotes: 1

Related Questions