1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Posts
    7
    Vote Rating
    0
    JoepRonde is on a distinguished road

      0  

    Default Answered: Extended Class of a formpanel doesn't show a frame

    Answered: Extended Class of a formpanel doesn't show a frame


    I want to extend a formpanel with default frame = true. The code below defines a custom class for a floating, draggable formpanel with a frame. Creating an instance of this class doesn't show a frame. It seems that the initConfig doesn't set the frame to true. Why not?
    Only when I create a instance of this class with a config object with frame = true it shows a frame.
    Can anyone explain this?

    Code:
    Ext.define('MyForm', {
        extend: 'Ext.form.Panel',
    
    
        config: {
            title: 'This panel wants a frame',
            width: 200,
            height: 100,      
            frame: true, // setting frame to true should give a frame, but it doesn't
            floating: true ,
            draggable: true
        },
        constructor: function(config) {
            // Calling the constructor of the parent class.
            this.callParent(arguments);
    
    
            // Initializing the config settings.       
            this.initConfig(config);
        }
    });
    
    
    Ext.create('MyForm').showAt(10,10);
    Ext.create('MyForm', {title: 'Now it has a frame', frame: true}).showAt(250,10);

  2. In Ext JS, you should really not use the config object. Some things may work but all in all, it's not fully implemented in the framework classes.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    In Ext JS, you should really not use the config object. Some things may work but all in all, it's not fully implemented in the framework classes.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Posts
    7
    Vote Rating
    0
    JoepRonde is on a distinguished road

      0  

    Default


    I think you're right, but then Sencha should update the documentation on this. I got this example from the Ex.Class documentation.
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Class-cfg-config

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi