Results 1 to 2 of 2

Thread: open Ext.Window from a toolbar button

  1. #1
    Sencha User arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516
    Vote Rating
    77
      0  

    Question open Ext.Window from a toolbar button

    I have a list of items in a grid, and I'm trying to open an Ext.Window object when one of those items is selected and a button in the GridPanel toolbar is pushed. Eventually I'm going to integrate with Google maps, but for now I just want the window to actually show up.

    Sadly, I'm failing to understand how to get my window to open when the button is pushed. Everything I've tried either gives me an error OR simply doesn't do anything.

    What I've got going so far...
    Code:
        function mapButton () {
            if (!googleMap) {
                var googleMap = new Ext.Window({
                    layout: 'fit',
                    title: 'Location Map',
                    closeAction: 'hide',
                    width: 400,
                    height: 400
                });
            }
        }
    
    locationToolbar = new Ext.Toolbar();
    locationToolbar.render();
    
    locationToolbar.add(
        {
          text: 'Location Map',
          handler: mapbutton,
        }
    );
    There's a bunch of other code, but I figure this is really the only relevant part to my question.

    Has anyone done this before? I couldn't find any posts on the message board specifically about this... I'd appreciate any help. Thanks!

  2. #2
    Sencha User arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516
    Vote Rating
    77
      0  

    Default

    aha, i've solved my own problem.

    The code I have is just fine.. I just needed to add "googleMap.show()" right before the close of my IF statement.

Posting Permissions

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