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
    Apr 2011
    Location
    Wisconsin
    Posts
    10
    Vote Rating
    0
    davidcfox is on a distinguished road

      0  

    Default Editable Content in Tab Panel

    Editable Content in Tab Panel


    Greetings. I am new to developing with EXT and I have hit a point where I need some help in my development efforts.

    I am using a TabPanel to pull in Product Descriptions and would like to make the Tab content area editable when a user doubleclicks on the description.

    Using the "Editable" example from the API, I have built a tab panel with editable content, however I have been unable to get the "Editable" area to fill the tab content area. Currently, I have a "textarea" that shows when I double click on the area I want to edit. Is it possible to convert the entire tab content area to an editable field when I call the "startEdit" function on it?

    I would also be interested to know if any of you have a better way to peform this task than what I have so far.

    Thank you for your time.
    Last edited by davidcfox; 20 Apr 2011 at 1:19 PM. Reason: Duplicate Post

  2. #2
    Sencha User
    Join Date
    Apr 2011
    Location
    Wisconsin
    Posts
    10
    Vote Rating
    0
    davidcfox is on a distinguished road

      0  

    Default


    I was able to successfully create an editable dataview that fills the entire tab area. I have posted the editor code below.

    I am setting the width and height of the editor dynamically by getting the width and height of the tab panel. You will notice that I had to subtract several pixels off of the height/width of the panel to account for padding, tab bar, etc.

    I placed this code within the tab panel's 'itemdblclick' listener.
    Code:
          
    var editorConfig = payload.container.editor,
                             view = payload.view,
                             record = payload.record,
                             el = payload.el;
    
            Ext.apply(editorConfig, {
                width : view.getWidth() - 5,
                height: view.up('tabpanel').getHeight() - 58,
                listeners : {
                    complete: function(editor, value, originalValue) {
                        var store = view.store;
                        record.set('description', value);
                    }
                }
            });
    
            var editor = Ext.create('Ext.Editor', editorConfig);
            editor.startEdit(el);
        }

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    Dallas, TX
    Posts
    204
    Vote Rating
    2
    Justin Noel is on a distinguished road

      0  

    Default


    I didn't quite follow all of your intent in the post. However, I very much recognize the issues you are having with getting the new content to fill the available area.

    Being new to Ext myself, I was really struggling with "liquid layout" situations. I FINALLY got a handle on this. Be sure to understand that "fit" and "border" are the only layouts (AFAIK) that will actually cause the content to fill in the containing area.

    At one point, I was so frustrated that I resorted to getting the dimensions of the containing area and applying it to my content. Finally, I learned layouts better and was able to overcome these. You might want to revisit the layout setting of your tab panel.

  4. #4
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    There are a number of layouts that cause their inner components to fit. These include Border and Fit as you mention, but also Anchor, VBox, HBox, and others.

  5. #5
    Sencha User
    Join Date
    Apr 2011
    Location
    Wisconsin
    Posts
    10
    Vote Rating
    0
    davidcfox is on a distinguished road

      0  

    Default


    Justin,
    Thanks for the information. I will definitely try the "fit" layout on my editor. Sometimes the obvious solution is the last one I consider!

    I thought I was being helpful in posting some code to show how I had solved my problem by getting the height and width of the container. Maybe that is not the best approach.

Similar Threads

  1. Key Events for Ext Components with Non-Editable Content
    By Cliff in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 19 Aug 2010, 8:47 AM
  2. beginner try to save content of a editable grid
    By chevaje in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Jan 2010, 2:34 PM
  3. [SOLVED] Content Panel : Add or refresh content
    By valery.stroeder in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 20 Nov 2009, 7:02 AM
  4. beginner try to save content of a editable grid
    By chevaje in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 23 Apr 2009, 4:12 AM
  5. Noob Question -- How do I use the exiting DIV content as panel content?
    By garretschweitzer in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 26 Mar 2009, 8:49 AM

Thread Participants: 2

Tags for this Thread