[CLOSED] Creating Desktop Window dynamicly - Task bar Minimizing

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Creating Desktop Window dynamicly - Task bar Minimizing

    Hi , It's me again :)

    I have issue when minimizing desktop window created in code behind

    Here is my code :

    <DirectMethod()>
        Public Sub CreateWindow()
            Desktop1.CreateWindow(New Ext.Net.Window With
            {
                .Title = "New window",
                .Width = 1000,
                .Height = 600,
                .Minimizable = True,
                .Collapsible = True,
                .CloseAction = CloseAction.Destroy,
                .Loader = New ComponentLoader With {
                    .DisableCaching = True,
                    .Url = "/Administration/TP1.aspx",
                    .Mode = LoadMode.Frame,
                    .AutoLoad = True},
                .Html = ""
            })
        End Sub
     <ext:DesktopModule ModuleID="create-module">
                        <Shortcut Name="Create window" Handler="function() {#{DirectMethods}.CreateWindow();}" SortIndex="3">
                        </Shortcut>
                    </ext:DesktopModule>

    When I click on min button nothing happens.


    Thanks
    Last edited by Daniil; Nov 20, 2012 at 1:10 PM. Reason: [CLOSED]
  2. #2
    Hi @inteligencija.

    I am unable to reproduce.

    Please provide a full test case and clarify an Ext.NET version you are using.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @inteligencija.

    I am unable to reproduce.

    Please provide a full test case and clarify an Ext.NET version you are using.
    I am using 2.1 (updated from svn last month )

    Here is running sample :
    Imports System.Web
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports Ext.Net
    Imports Ext.Net.Utilities
    
    
    Public Class _Default
        Inherits System.Web.UI.Page
    
        
    
        <DirectMethod()>
        Public Sub CreateWindow()
            Dim load As New Ext.Net.ComponentLoader
            Dim win_tem As New Ext.Net.Window
            win_tem.Title = "Transfer Prices"
            win_tem.Width = 1000
            win_tem.Height = 600
            win_tem.Minimizable = True
            load.LoadMask.ShowMask = True
            load.LoadMask.Msg = "Učitavanje modula " + win_tem.Title()
            load.Url = "/Administration/TP1.aspx"
            load.Mode = LoadMode.Frame
            load.AutoLoad = True
            load.DisableCaching = True
            win_tem.Loader = load
    
            Desktop1.CreateWindow(win_tem)
    
            'Desktop1.CreateWindow(New Ext.Net.Window With
            '{
            '    .Title = "New window",
            '    .Width = 1000,
            '    .Height = 600,
            '    .Minimizable = True,
            '    .Collapsible = True,
            '    .CloseAction = CloseAction.Destroy,
            '    .Loader = New ComponentLoader With {
            '        .DisableCaching = True,
            '        .Url = "/Administration/TP1.aspx",
            '        .Mode = LoadMode.Frame,
            '        .AutoLoad = True},
            '.Html = ""
            '})
        End Sub
    End Class

    and :

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="MDM._Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        
         <title>MDM Home</title>
        <link rel="stylesheet" type="text/css" href="~/resources/desktop.css"/>
        <link rel="shortcut icon" type="image/x-icon" href="~/resources/favicon.ico"/>
    </head>
    <body>
        <form id="formDesktop" runat="server" >
    
        <div> 
            <ext:ResourceManager ID="rmDefault" runat="server" Locale="pt-PR" Theme="Default" ViewStateMode="Enabled" />
         
            <ext:Desktop ID="Desktop1" runat="server" >   
                <Modules>   
                    <ext:DesktopModule ModuleID="create-module">
                        <Shortcut Name="Create window" Handler="function() {#{DirectMethods}.CreateWindow();}" SortIndex="3">
                        </Shortcut>
                    </ext:DesktopModule>
                </Modules>
                
                <DesktopConfig Wallpaper="resources/wallpapers/white.jpg" WallpaperStretch="true" ShortcutDragSelector="true" ShortcutEvent="dblclick" Stateful="true"  StateID="DesktopStateID" >
                    <ShortcutDefaults IconCls="x-default-shortcut" TextCls="x-shortcut-text" />
                    <Content>
                       <ext:Image ID="imgDLogo" Draggable="true" runat="server" ImageUrl="resources/logo1.png" StyleSpec="position:absolute;right:10px;top:20px;"/> 
                    </Content>
                </DesktopConfig>
                <StartMenu ID="StartMenu" Title="Start Menu" Icon="StarSilver" Height="370" Weight="310" />
               
                <TaskBar TrayWidth="100">
                    <QuickStart>
                        <ext:Toolbar ID="ToolbarQuickStart" runat="server"/>
                    </QuickStart>
                    <Tray>
                        <ext:Toolbar ID="ToolbarLangugage" runat="server" />
                    </Tray>
                </TaskBar>
            </ext:Desktop>
        </div>
        </form>
    </body>
    </html>
    Testing on Chrome and Mozilla.
  4. #4
    It works well for me.

    So, please update from SVN.
  5. #5
    Quote Originally Posted by Daniil View Post
    It works well for me.

    So, please update from SVN.
    After update from svn.
    It works well for me, too


    I have one quick question

    How to put loadermask in this code

    <Ext.Net.DirectMethod(ShowMask:=True, Msg:="This is not mask that I want ...")> _
        Public Sub CreateWindow()
          
            Desktop1.CreateWindow(New Ext.Net.Window With
            {
                .Title = "Transfer Prices",
                .Width = 1000,
                .Height = 600,
                .Minimizable = True,
                .Collapsible = True,
                .CloseAction = CloseAction.Destroy,
                .Loader = New ComponentLoader With {
                    .DisableCaching = True,
                    .Url = "/Administration/TP1.aspx",
                    .Mode = LoadMode.Frame,
                    .AutoLoad = True},
            .Html = ""
            })
        End Sub
  6. #6
    Please configure the Loader's LoadMask property.
  7. #7
    Quote Originally Posted by Daniil View Post
    Please configure the Loader's LoadMask property.
    I know that but I am getting compiler error (loadmask property is read only ) when add



    .Loader = New ComponentLoader With {
                    .LoadMask = New LoadMask With {.ShowMask = True, .Msg = "Učitavanje"},
                    .LoaderMask  = true 
                    .
                    .
                    .},

    Can u post working example which contains exact code that I can use. I can note see any available property related to Mask in my IDE when use this approach
    Last edited by inteligencija; Nov 19, 2012 at 11:33 AM.
  8. #8
    Do not create a LoadMask instance. It is created internally.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Ext.Net.Panel p = new Ext.Net.Panel();
                p.Width = 400;
                p.Height = 400;
                p.Loader = new ComponentLoader()
                    {
                        Url = "http://ext.net",
                        LoadMask =
                        {
                            ShowMask = true
                        }
                    };
                this.Form.Controls.Add(p);
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
        </form>
    </body>
    </html>
  9. #9
    Your code works fine when using C# in code behind.

    I can not make this code work in code behind when using vb.

    For example when code like this:
    Protected Sub Page_Load(sender As Object, e As EventArgs)
    If Not X.IsAjaxRequest Then
                Dim p As New Ext.Net.Panel()
                p.Width = 400
                p.Height = 400
                p.Loader = New ComponentLoader() With { _
                  .Url = "http://ext.net", _
                  .LoadMask = {.ShowMask = True} _
                }
                Me.Form.Controls.Add(p)
            End If
    End sub
    I am getting error - ' Showmask' is not a member of ext.net.componentloader.

    else if I use
    .LoadMask = {LoadMask .ShowMask = True} _
    I am getting error - LoadMask is read-only property .

    LoadMask is not available according to my intelliSense but it is recognized as read-only property.

    I know this is annoying but I can not figure it out so any help would be very appreciated .
    thanks
    Last edited by inteligencija; Nov 20, 2012 at 8:30 AM.
  10. #10
    Well, I don't know to initialize complex properties in VB.NET (I am not even sure it is possible. Please tell if you will know it for sure).

    But you can achieve it this way.

    Example
    <%@ Page Language="VB" %>
      
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        Protected Sub Page_Load(sender As Object, e As EventArgs)
            If Not Ext.Net.X.IsAjaxRequest Then
                Dim p As New Ext.Net.Panel()
                p.Width = 400
                p.Height = 400
                p.Loader = New ComponentLoader() With { _
                  .Url = "http://ext.net"
                }
                p.Loader.LoadMask.ShowMask = True            
                Me.Form.Controls.Add(p)
            End If
        End sub
    </script>
     
    <!DOCTYPE html>
     
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
        </form>
    </body>
    </html>
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] [#54] Window not minimizing
    By pawangyanwali in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Dec 06, 2012, 3:49 PM
  2. [CLOSED] Desktop Task bar options
    By schellappa in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 03, 2011, 5:40 PM
  3. [CLOSED] Issue with Tree Grid and Desktop task bar
    By ducnt in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 29, 2010, 9:07 AM
  4. Problem with creating Dynamic Windows on Desktop
    By marcelodecon in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2010, 11:25 AM

Posting Permissions