Reputation: 151
I'm using this to pick colors from a colorfield selector. However I don't want the alpha bar to be usable and viewable. How do I hide this from my overview? It seems to be a simple question but I really don't know the answers.
Upvotes: 0
Views: 199
Reputation: 327
If you override that class, or extend it into your own component and change the constructor to the following:
constructor: function (config) {
var me = this,
childViewModel = Ext.Factory.viewModel('colorpick-selectormodel');
// Since this component needs to present its value as a thing to which users can
// bind, we create an internal VM for our purposes.
me.childViewModel = childViewModel;
me.items = [
me.getMapAndHexRGBFields(childViewModel),
me.getSliderAndHField(childViewModel),
me.getSliderAndSField(childViewModel),
me.getSliderAndVField(childViewModel),
/* remove this one as it is the alpha field */
//me.getSliderAndAField(childViewModel),
me.getPreviewAndButtons(childViewModel, config)
];
me.callParent(arguments);
},
Upvotes: 3