Jump to content

Simple TIP: Combobox - Wider drop-down picker


estrify

Recommended Posts

Hi,

 

For some combobox I am using, I need to make the picker wider than the combo itself (see image). If you need something similar, add the following code to your combo:

 

Within  "Combobox  ->  UniEvents  ->  Ext.form.field.Combobox  ->  afterCreate",  add the following

function afterCreate(sender)
{
  Ext.apply(sender, {
    matchFieldWidth: false,
    pickerOffset: [0,-1]
  });

  var picker;
  picker=sender.getPicker();
  picker.maxWidth=sender.width*2;  // Here, change the multiplier to adjust it to your needs, 
                                   // or directly specify a width
  picker.border=1;
}

Best regards,

post-743-0-26740100-1450265766_thumb.png

post-743-0-91808600-1450265786_thumb.png

  • Upvote 1
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...