Jump to content


Photo

Simple TIP: Combobox - Wider drop-down picker


  • Please log in to reply
2 replies to this topic

#1 estrify

estrify

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 341 posts

Posted 16 December 2015 - 11:36 AM

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,

Attached Files


  • 1

#2 Schuiab

Schuiab

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 317 posts

Posted 16 December 2015 - 11:38 AM

Thank you


  • 0

#3 wildfoxwolf

wildfoxwolf

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 12 September 2017 - 02:13 PM

thank you


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users