1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    41
    Vote Rating
    0
    cgokey2 is on a distinguished road

      0  

    Default mimic toolbar button (>>) click without user actually clicking it in border layout?

    mimic toolbar button (>>) click without user actually clicking it in border layout?


    Sorry, I posted this over in bugs and meant to post it here...
    Is there a way to mimic a toolbar button (">>") click without the user actually clicking it?

    Let me explain...

    I've got a BorderLayout with a West panel that collapses. If you click on the collapse panel itself,
    it opens the West container in a popup (normal behavior). If you click on the toolbar button (">>"), it opens the left panel like normal (not as a popup, also normal behavior).

    I really don't want the popup effect. So what I've done is this is override the createCollapsePanel method and add an onClick event on the collapsed panel itself. Then in this onClick event I then just want to mimic clicking the toolbar button (">>").

    Here is how I'm attempting to do it:

    Code:
     BorderLayout mainLayout = new BorderLayout()
            {
                /*should this class be moved to it's own file?*/
                protected CollapsePanel createCollapsePanel(ContentPanel panel
                        , BorderLayoutData data)
                {
    
    
                    CollapsePanel p = super.createCollapsePanel(panel, data);
                    p.setId("ktree-refinment-collapse-panel");
                    p.addListener(Events.OnClick, new Listener<BaseEvent>()
                    {
                        public void handleEvent(BaseEvent baseEvent)
                        {
                            // really want to MIMIC clicking the toolbar button here.
                            leftNav.expand();
                            presenter.onExpandLeftNav();
                            leftNav.layout(true);
                        }
                    });
                    return p;
                }
            };

    Any help here would be really appreciated.

    Thanks,
    Chris

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Posts
    41
    Vote Rating
    0
    cgokey2 is on a distinguished road

      0  

    Question


    Any ideas? Is there a way that I can just fake a button click event to the toolbar button (>>), that will also give me the desired affect?

    Chris

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    Perfectchaos is on a distinguished road

      0  

    Default


    I am also interested in doing this. For me, it would be best if clicking on the panel opens it normally without the popup. But also disabling the popup completely would work in my case. I haven't been able to either quite yet.

    PC

  4. #4
    Sencha User
    Join Date
    Mar 2009
    Posts
    41
    Vote Rating
    0
    cgokey2 is on a distinguished road

      0  

    Default


    I was able to hack this to make it work. I had to create my own custom class and copy some code from the source which was private, but it would be really nice if there was some property like:

    borderlayout.setOpenInPopupPanel(false);

    Chris

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar