Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    18
    Vote Rating
    0
    hulek89 is on a distinguished road

      0  

    Default updating select width on label content changed

    updating select width on label content changed


    hi, how can I update width of a select label, when i change it's content ? cos it stays the same as on creation time, and when i change the label value it's partly cut. i tried doLayout() and do componentLayout() and it ain't work. any ideas? i bet it's real easy....

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi hulek89.
    I post you a simple example to show you how to dinamically change a form field according to the select field value

    Code:
    Ext.setup({
        onReady: function() {
            var myForm = new Ext.Panel({
                fullscreen: true,
                 dockedItems: [{
                      xtype: 'toolbar',
                    dock: 'top',
                    title: 'Sample'
                   }],
                    items: [{
                    xtype: 'selectfield',
                    id: 'cmbSample',
                    label: 'Label Width',
                    options: [
                        {text: 'Option 1 (100px)', value: '100'},
                        {text: 'Option 2 (500px)', value: '500'}
                    ],
                    listeners: {
                        change: function(cmp, value){
                            
                            //Here i change the label width of txtSurname field according to the selected value
                            myForm.getComponent('cmbSample').setLabelWidth(value);
                            
                        }
                    }
                }]
            });
        }
    });
    In this way when you change the value of the select field, it's label is changed dynamically with the selected value.

    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    18
    Vote Rating
    0
    hulek89 is on a distinguished road

      0  

    Default


    hi, many thanks for your reply, although it's not exaclty waht i'm looking for. i might not have made myself clear on that. what i basically need is a way to detect when label text value is wider than label itself, so i can prevent overflow. i need sth to detect this overflow or a method that'd would redraw control so the text fits the label width? is there any way do to it this way?

Similar Threads

  1. ui not updating after component config options have been changed
    By capn in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Dec 2008, 6:35 AM
  2. [Solved] Updating locally changed treenode
    By Ben in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 17 Nov 2008, 4:30 PM
  3. Problem with tree updating when changed (cache issue maybe)
    By superFly77 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Jun 2008, 10:42 AM
  4. Tabs' width in a layout is not changed when the region width changes
    By maya in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 3 Jun 2008, 12:47 AM
  5. Updating trees when server data is changed
    By maya in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 16 Apr 2007, 12:07 AM

Thread Participants: 1