Results 1 to 7 of 7

Thread: Reusing a menu button on different screens

  1. #1
    Sencha User
    Join Date
    Oct 2017
    Posts
    54

    Default Answered: Reusing a menu button on different screens

    What is the best way to reuse a menu button on different screen's toolbars without duplicating it?

    Thanks,
    Joud

  2. You can right click on menu button and 'Promote to class' - that will give you a linkable class

  3. #2
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Answers
    103

    Default

    Using linking aka use xtypes

    Do drag and drop , create a link http://prntscr.com/h6vspu and http://prntscr.com/h6vsui

    Or you mean something different?

  4. #3
    Sencha User
    Join Date
    Oct 2017
    Posts
    54

    Default

    Quote Originally Posted by petr.vecera View Post
    Using linking aka use xtypes

    Do drag and drop , create a link http://prntscr.com/h6vspu and http://prntscr.com/h6vsui

    Or you mean something different?
    I already tried drag and drop but the menu button is moved to the other panel, the message "copy, move, link" doesn't appear :/

  5. #4
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Answers
    103

    Default

    Which class is your menu button ? Can you share screenshot or copy the code ?

  6. #5
    Sencha User
    Join Date
    Oct 2017
    Posts
    54

    Default

    Here's the code:
    Code:
     xtype: 'toolbar',
                docked: 'top',
                layout: {
                    type: 'hbox',
                    pack: 'center'
                },
                items: [
                    {
                        xtype: 'button',
                        ui: 'action',
                        docked: 'left',
                        menu: {
                            xtype: 'menu',
                            minWidth: '150px',
                            items: [
                                {
                                    xtype: 'menuitem',
                                    text: 'New'
                                },
                                {
                                    xtype: 'menuitem',
                                    text: 'Open'
                                },
                                {
                                    xtype: 'menuitem',
                                    text: 'Edit'
                                },
                                {
                                    xtype: 'menuitem',
                                    text: 'Save'
                                }
                            ]
                        }
                    }
                ]

  7. #6
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    New Zealand
    Posts
    152
    Answers
    6

    Default

    You can right click on menu button and 'Promote to class' - that will give you a linkable class

  8. #7
    Sencha User
    Join Date
    Oct 2017
    Posts
    54

    Default

    Thanks a lot, it worked.

Similar Threads

  1. EXTJS6 modern app in EXTJS3.4 - how to be done?
    By joud in forum Ext JS 6.x Q&A
    Replies: 0
    Last Post: 3 Nov 2017, 4:51 AM
  2. Integrate EXTJS6 modern app in EXTJS3.4
    By joud in forum Sencha Architect 4.x: Q&A
    Replies: 0
    Last Post: 3 Nov 2017, 3:35 AM
  3. Different folder name for classic/modern
    By demongloom in forum Ext JS 6.x Q&A
    Replies: 6
    Last Post: 29 May 2016, 11:26 PM
  4. how to integrate gmappanel in extjs3.4
    By kiran333 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 11 Feb 2015, 8:10 PM
  5. Parent folder icon changed on deletion of child folder
    By sachin sachdeva in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 11 Oct 2010, 9:47 PM

Posting Permissions

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