xtype Selection dropdown width | Adobe Higher Education
Skip to main content
trench999
Level 4
October 16, 2015
Beantwoord

xtype Selection dropdown width

  • October 16, 2015
  • 2 reacties
  • 1899 Bekeken

We are finding a lot of usability issues with the default width of dialog widgets.  We have been using:

anchor="" width="160"

...for various other components including text inputs and color pickers.  This does not work for selection dropdown.

Er kunnen geen reacties meer worden geplaatst op dit onderwerp.
Beste antwoord door smacdonald2008

You can set the width of a dropdown in a custom xtype when you declare the  CQ.form.Selection object using the new operator. See this code:

 this.allowField = new CQ.form.Selection({
            type:"select",
            autoWidth: false,
            width: 700,

            cls:"ejst-customwidget-1",
            listeners: {
                selectionchanged: {
                    scope:this,
                    fn: this.updateHidden
                }
            },
            optionsProvider: this.optionsProvider
        });
        this.add(this.allowField);

This code results in:

[img]DropDownWIdth.png[/img]

For those reading this thread and wanting to know how to develop a custom xtype in a CQ component -- see: 

http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html

2 reacties

smacdonald2008
Level 10
October 16, 2015

You can set the width of a dropdown in a custom xtype when you declare the  CQ.form.Selection object using the new operator. See this code:

 this.allowField = new CQ.form.Selection({
            type:"select",
            autoWidth: false,
            width: 700,

            cls:"ejst-customwidget-1",
            listeners: {
                selectionchanged: {
                    scope:this,
                    fn: this.updateHidden
                }
            },
            optionsProvider: this.optionsProvider
        });
        this.add(this.allowField);

This code results in:

[img]DropDownWIdth.png[/img]

For those reading this thread and wanting to know how to develop a custom xtype in a CQ component -- see: 

http://helpx.adobe.com/experience-manager/using/creating-custom-xtype.html

trench999
trench999Auteur
Level 4
October 16, 2015

Thanks.  This was a good clue, but does not work in a tabpanel > panel > fieldset dialog.xml config