Results 1 to 3 of 3

Thread: Rendering a button

  1. #1
    Sencha User youds's Avatar
    Join Date
    Jun 2008
    Posts
    8

    Default Rendering a button

    Hi

    See code
    Code:
    // Simple button, small, text only
        Ext.createWidget('button', Ext.apply({
            text : 'Small',
            scale: 'small',
            color: 'red'
        }));
    Why is this not generating a button???

  2. #2
    Sencha Premium User
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    72
    Answers
    17

    Default

    Ext.createWidget has been depreciated since 4.0 instead you could use Ext.widget.

    Below creates the button and you will notice I am not using Ext.apply. No need for Ext.apply
    Code:
            Ext.widget('button',{
                 text     : 'Small',
                 scale    : 'small',
                 color    : 'red',
                 renderTo : Ext.getBody()
            });

  3. #3
    Sencha User youds's Avatar
    Join Date
    Jun 2008
    Posts
    8

    Default

    so i needed the renderTo config option

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •