[CLOSED] MVC - Layout

  1. #1

    [CLOSED] MVC - Layout

    Hi,

    With code below
    <body>    @(x.ResourceManager())
    
    
        @using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
        {
            @(x.Viewport()
               .Layout(LayoutType.Center)
               .Items(x.Panel()
                       .Layout(LayoutType.Center)
                       .CustomConfig(collection => collection.Add(new ConfigItem { Name = "width", Value = "75%", Mode = ParameterMode.Value })))
               .Items(x.FormPanel()
                       .ButtonAlign(Alignment.Center)
                       .Frame(true)
                       .Items(Html.X().TextField()
                                  .FieldLabel("Username")
                              , Html.X().TextField().FieldLabel("Password"))
                       .Buttons(Html.X().Button().ID("login").Text("Login").Icon(Icon.Accept))))
        }
    </body>
    I got a JavaScript error
    Uncaught TypeError: Cannot call method 'substring' of undefined
    Click image for larger version. 

Name:	MVC.png 
Views:	22 
Size:	7.0 KB 
ID:	6908

    Can you tell me how to fix it?

    Thanks,
    Last edited by Daniil; Sep 18, 2013 at 6:22 AM. Reason: [CLOSED]
  2. #2
    Hello,

    I believe .width must be a fixed pixel value, not a percentage.

    If you wish to use a proportional with, try using the HBoxLayout and setting the .Flex values.

    I also believe the "Center" layout type has been discontinued, or at the minimum, you should not use. Much better to use HBoxLayout.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    Hello,

    I believe .width must be a fixed pixel value, not a percentage.

    If you wish to use a proportional with, try using the HBoxLayout and setting the .Flex values.

    I also believe the "Center" layout type has been discontinued, or at the minimum, you should not use. Much better to use HBoxLayout.

    Hope this helps.
    Hi,

    It does help. thank you.

Similar Threads

  1. [CLOSED] layout issue when using RowLayout within column layout
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 11, 2012, 2:40 PM
  2. [CLOSED] VBoxLayout layout does not refresh the layout automatically
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 23, 2011, 1:52 PM
  3. [CLOSED] vbox layout inside column layout
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 04, 2011, 2:44 PM
  4. [CLOSED] Basic Layout question for Layout Fit / AutoHeight
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 07, 2010, 11:57 AM
  5. [CLOSED] Page layout using layout controls.
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 23, 2010, 12:08 PM

Posting Permissions