[CLOSED] Window .Buttons spacing

  1. #1

    [CLOSED] Window .Buttons spacing

    Is there a way to place a group of buttons in the .Buttons() collection aligned to the left and another group to the right?
    Or maybe putting a spacer between them so the right ones are pushed to the right?

            .Buttons(
                X.Button()
                    .Text("Set Property")
                    .DirectEvents(de => {
                        de.Click.Url = Url.Action("SetIFrameLoadProperty");
                        de.Click.Method = HttpMethod.GET;
                        de.Click.ExtraParams.Add(new Parameter("containerId", "Panel3"));
                    }),
                **** SPACER pushing to the right?
                X.Button()
                    .Text("Load")
                    .DirectEvents(de => {
                        de.Click.Url = Url.Action("LoadIFrameContent");
                        de.Click.ExtraParams.Add(new Parameter("containerId", "Panel3"));
                    })
            )
    Thank you
    Last edited by Daniil; Jun 15, 2015 at 1:22 PM. Reason: [CLOSED]
  2. #2
    Hi @registrator,

    A Window's Buttons is a shorthand for a bottom docked item.
    http://docs.sencha.com/extjs/4.2.1/#...el-cfg-buttons

    You cannot add a Button on the left with a Butttons config, but you can define a bottom docked item from scratch.

    @{
        var X = Html.X();
    }
    
    <!DOCTYPE html>
    <html>
    <head>
        <title>Ext.Net.MVC v2 Example</title>
    </head>
    <body>
        @X.ResourceManager()
    
        @(X.Window()
            .Html("Content")
            .DockedItems(
                X.Toolbar()
                    .Dock(Dock.Bottom)
                    .UIName("footer")
                    .Items(
                        X.Button().Text("Left"),
                        X.Component().Flex(1),
                        X.Button().Text("Right")
                    )
            )
        )
    </body>
    </html>
    Last edited by Daniil; Jun 05, 2015 at 10:32 AM.
  3. #3
    Thank you Daniil

    The only thing about this is that the buttons are "flat" until you hover over them.
    Is there a way to change their style to look like when mouse over?

    Thank you
  4. #4
    Hmm, it doesn't look flat to me, but to apply any CSS rules please use a Button's Cls property.

Similar Threads

  1. [CLOSED] spacing buttons in buttongroup
    By gets_gui in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 08, 2012, 4:04 PM
  2. [CLOSED] Another group of buttons in Window
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 20, 2012, 6:27 PM
  3. [CLOSED] Spacing and size - buttons in pagingtoolbar
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 03, 2011, 6:57 AM
  4. Replies: 3
    Last Post: Jun 10, 2011, 1:17 PM
  5. Replies: 5
    Last Post: Aug 15, 2008, 3:28 PM

Posting Permissions