Create window dinamically

  1. #1

    Create window dinamically

    Hi guys,
    I, am trying to create a new Window during a DirectEvent, but Windows doesn't appear.

    <%@ Page Language="VB" %>

    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

    <script runat="server">
    Protected Sub BtnUser_Click(sender As Object, e As DirectEventArgs)
    Dim winPassword As New Ext.Net.Window() With _
    {.ID = "winPass", .Modal = True, .Title = "Change Password", _
    .Icon = Icon.Key, .Width = Unit.Pixel(400), .Height = Unit.Pixel(200), .Layout = LayoutType.Fit}

    Dim fplPassword As New Ext.Net.FormPanel() With _
    {.ID = "fplPass", .Split = True, .Margins = "0 5 5 5", .Frame = True, _
    .Icon = Icon.User, .DefaultAnchor = "100%"}
    Dim txtCurrentPassword As New Ext.Net.TextField() With _
    {.ID = "txtCurrentPass", .FieldLabel = "Current Password"}
    Dim txtNewPassword As New Ext.Net.TextField() With _
    {.ID = "txtNewPass", .FieldLabel = "New Password", .InputType = InputType.Password}

    Dim txtConfPassword As New Ext.Net.TextField() With _
    {.ID = "txtConfPass", .Vtype = "password", .FieldLabel = "Confirm Password", _
    .InputType = InputType.Password, .MsgTarget = MessageTarget.Side}
    Dim cfgItem As New ConfigItem() With _
    {.Name = "initialPassField", .Value = "#{txtNewPass}", .Mode = ParameterMode.Value}
    Dim btnSaves As New Ext.Net.Button() With _
    {.ID = "btnSave", .Text = "Save", .Icon = Icon.Disk}
    btnSaves.Listeners.Click.Handler = "App.direct.SavePassword();"
    Dim btnCancels As New Ext.Net.Button() With _
    {.ID = "btnCancel", .Text = "Cancel", .Icon = Icon.Cancel}

    btnCancels.Listeners.Click.Handler = "#{winPassword}.hide();"
    txtCurrentPassword.CustomConfig.Add(cfgItem)
    fplPassword.Items.Add(txtCurrentPassword)
    fplPassword.Items.Add(txtNewPassword)
    fplPassword.Items.Add(txtConfPassword)
    fplPassword.Add(btnSaves)
    fplPassword.Add(btnCancels)
    winPassword.Add(fplPassword)
    Me.Form.Controls.Add(winPassword)
    End Sub
    <DirectMethod()> _
    Public Sub SavePassword()
    'Save New Password
    End Sub
    </script>

    <!DOCTYPE html>

    <html>
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form runat="server">
    <ext:ResourceManager runat="server" />

    <ext:Button ID="btnUser" runat="server" Icon="Group">
    <ToolTips>
    <ext:ToolTip ID="ttUser" runat="server" Html="Change Password" />
    </ToolTips>
    <DirectEvents>
    <Click OnEvent="BtnUser_Click"></Click>
    </DirectEvents>
    </ext:Button>
    </form>
    </body>
    </html>

    Thanks in advance
  2. #2
  3. #3
    As well, please see item #3 at the following location,

    http://forums.ext.net/showthread.php...ation-Required
    Geoffrey McGill
    Founder
  4. #4
    Quote Originally Posted by geoffrey.mcgill View Post
    As well, please see item #3 at the following location,

    http://forums.ext.net/showthread.php...ation-Required
    I followed the instructions you recommended above, but the code is not formatted in the
    post editor. The problem continues, the windows doesn't appear.

    I tried the same way that the example in https://examples2.ext.net/#/XRender/Basic/New_Window/ does, as Vladimir recommended, but window doesn't appear.

    Thanks for reply.

Similar Threads

  1. Create new window dynamically on button click from another window
    By softlabsgroup.support in forum 1.x Help
    Replies: 6
    Last Post: May 01, 2012, 9:26 AM
  2. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  3. [CLOSED] Add button to dinamically created window toolbar
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 13, 2011, 4:07 PM
  4. [CLOSED] Create GridPanel dinamically with javascript
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 09, 2010, 9:58 PM

Tags for this Thread

Posting Permissions