Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Don't close menu on checked

  1. #1
    Ext JS Premium Member Asken's Avatar
    Join Date
    Feb 2010
    Location
    sweden
    Posts
    123

    Default Don't close menu on checked

    I have a menu in a toolbar. When checking a menu item the menu closes. Can I prevent that behaviour as it should be possible to check several before closing the menu?

    K

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Code:
    hideOnClick:false

  3. #3
    Ext JS Premium Member Asken's Avatar
    Join Date
    Feb 2010
    Location
    sweden
    Posts
    123

    Default

    All too easy! Should have found that!

    Thanks!

  4. #4
    Ext User foe's Avatar
    Join Date
    Jul 2008
    Location
    Venezuela
    Posts
    7

    Default

    Condor does this approach works on a formpanel contained inside a menu?

    I'll paste a snippet of how my menu looks like...

    Code:
      menu: {
          xtype: 'menu',
          style: {
            overflow: 'visible'     // For the Combo popup
          },
          defaults: {
            
          },
          items:[
            {
              xtype: 'form',
              labelAlign: 'top',
              items:[
                {
                  xtype: 'textfield',
                  allowBlank: false,
                  fieldLabel: 'Name',
                  id: 'name',
                  anchor: '100%'
                },
                {
                  xtype: 'combo',
                  id: 'fieldType',
                  fieldLabel: 'Field Type',
                  allowBlank: false,
                  selectOnFocus: true,
                  editable: false,
                  triggerAction: 'all',
                  store: availableDataTypesStore,
                  displayField:'name',
                  valueField: 'code',
                  mode: 'local',
                  emptyText:'Select..',
                  anchor: '100%'
                }
              ]
            }
          ]
        }
    I've tried including hideOnClick: false on the combo or the form and none of those did the trick...

    Thanks in advance...
    ~ Guillermo Velasquez

    @moquez
    http://www.moquez.com

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    In the form.

    Works for me:


  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Your combo will need

    Code:
                                    getListParent: function() {
                                        return this.el.up('div.x-menu');
                                    },

  7. #7
    Ext User foe's Avatar
    Join Date
    Jul 2008
    Location
    Venezuela
    Posts
    7

    Default

    Thanks Animal, works like a charm...

    Now I'm curious, how did you manage to make your form looks like embedded on the menu... Mine looks white and I'm kinda having trouble with the buttons positioning. If I use the buttons property of the form the panel just looses its proportion.

    Any help on this topic would be great...

    Thanks
    ~ Guillermo Velasquez

    @moquez
    http://www.moquez.com

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Configure your menu

    Code:
    plain: true
    And the FormPanel

    Code:
                                border: false,
                                bodyStyle: {
                                    background: 'transparent'
                                },
                                padding: 5,

  9. #9
    Ext User foe's Avatar
    Join Date
    Jul 2008
    Location
    Venezuela
    Posts
    7

    Default

    Quote Originally Posted by Animal View Post
    Your combo will need

    Code:
                                    getListParent: function() {
                                        return this.el.up('div.x-menu');
                                    },
    And what about when using a DateField? I tried looking for something similar to the getListParent but I couldn't find something similar...

    Do you know how to work around this?

    ~ Thanks in advance!!!!!
    ~ Guillermo Velasquez

    @moquez
    http://www.moquez.com

  10. #10
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    you'll have to look at the source

Page 1 of 2 12 LastLast

Similar Threads

  1. Change radio checked in menu
    By yar0 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 9 Mar 2010, 3:34 AM
  2. don#t get the value of an checked radiobutton
    By ballibum in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 19 Jan 2010, 3:56 AM
  3. [FIXED] DataList : removeAll don't clear checked ArrayList
    By Zorn in forum Ext GWT: Bugs (1.x)
    Replies: 1
    Last Post: 18 Sep 2008, 10:38 AM
  4. tab close images don't always show in IE6 for borderlayout
    By vtswingkid in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 1 Dec 2006, 11:36 AM

Posting Permissions

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