Sencha ActionSheet examples

The Sencha website has a few good examples of how to use an ActionSheet, including this basic one:

Ext.application({
    launch: function () {
        var actionSheet = Ext.create('Ext.ActionSheet', {
            items: [{
                text: 'Delete draft',
                ui: 'decline'
            }, {
                text: 'Save draft'
            }, {
                text: 'Cancel',
                ui: 'confirm'
            }]
        });

        Ext.Viewport.add(actionSheet);
        actionSheet.show();
    }
});

That example comes from this URL:

Configuration definition

Defined with a configuration approach, that code would look more like this:

Ext.define('Radio.view.TestSheet', {
    extend: ''Ext.ActionSheet',
    alias: 'widget.testSheet',

    items: [
    {
        text: 'Delete draft',
        ui: 'decline'
    },
    {
        text: 'Save draft'
    },
    {
        text: 'Cancel',
        ui: 'confirm'
    }]
});

I didn’t try to compile/run that code, but it looks okay.

More examples (handlers, titlebar)

Other Sencha ActionSheet examples are at these URLs:

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.