Results 1 to 7 of 7

Thread: Useful trick: multiple toolbars in contentPanel!

  1. #1
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293
    Vote Rating
    0
      0  

    Default Useful trick: multiple toolbars in contentPanel!

    I made a little trick, in need to put multiple toolbars in one content panel, maybe it'll be useful for someone(for me is much useful):

    PHP Code:
        var tb = new Ext.Toolbar(panel.el);
        
    tb.add("First row:",{
            
    text:"Button 1"
        
    },'-',{
            
    text:"Button 2"
        
    });

        var 
    tb2container=Ext.DomHelper.append(tb.el,{tag:'div',id:Ext.id()},true);

        var 
    tb2 = new Ext.Toolbar(tb2container);
        
    tb2.add("Second row:",{
            
    text:"Button 3"
        
    },'-',{
            
    text:"button 4"
        
    }); 
    You can attach any number of toolbars, following this pattern.

    A screenshot is also attached.

    If someone has other (better) way to to this, please post here and let me know.

    Note: Ext.DomHelper.append(...) appends a <div /> tag. I suppose this is not a problem, since this div isn't closed-I use it only as separator.
    Attached Images Attached Images
    "It is better to be young, pretty and rich instead old, ugly and poor."
    (c) Alan Ford.

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    70
    Vote Rating
    0
      0  

    Default

    i need,tks

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
      0  

    Default

    Thanks, I need this too.

  4. #4
    Ext User violinista's Avatar
    Join Date
    Apr 2007
    Location
    Serbia
    Posts
    293
    Vote Rating
    0
      0  

    Default

    You're welcome
    "It is better to be young, pretty and rich instead old, ugly and poor."
    (c) Alan Ford.

  5. #5
    Sencha Premium Member andrei.neculau's Avatar
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    197
    Vote Rating
    0
      0  

    Default

    Request: Why not add '--' or '\n' or 'hr' as a text shortcut for creating a horizontal divider like '-' for Separator?

  6. #6
    Ext User manugoel2003's Avatar
    Join Date
    Mar 2007
    Location
    New Delhi, India
    Posts
    314
    Vote Rating
    0
      0  

    Default

    nice little trick.... does it work with gridPanels and treePanels as well??..... what abt nested layouts???
    Manu Goel
    manugoel2003 [at] gmail [dot] com
    http://www.linkedin.com/in/manugoel

  7. #7
    Ext User
    Join Date
    May 2007
    Posts
    48
    Vote Rating
    0
      0  

    Default Does it work with gridPanel?

    Quote Originally Posted by manugoel2003 View Post
    nice little trick.... does it work with gridPanels and treePanels as well??..... what abt nested layouts???
    It does not.

Posting Permissions

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