Dynamic coolite windows

  1. #1

    Dynamic coolite windows

    Hi,

    Ive been extensive development using coolite window control but the one problem i seem to realise is when developing using dynamically created window controls.

    From my knowledge so far you can only open dynamically created window by loading it in a PlaceHolder control. (Please correct me if im wrong)

    Until now ive only be able to open a new window within the parent window. What i actually want is to open a new window outside the frame of the calling window.

    I would appreciate is you could provide a few samples detailing on creating multiple dynamically created window and opening new dynamically created window from within that windows and independent of the parent window.

    Thank you in advance.
  2. #2

    RE: Dynamic coolite windows

    Hi sashe,

    I think you're going to have to provide a code sample mockup/example what you like to be able to do. The code sample does not have to work, but it does need to demonstrate how you would expect things to work, or how you like things to work.

    You should be able to create an <ext:Window> and add to the .Controls collection of any .NET Control, whether that Control is in the <form> or not.

    Example

    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Window win = new Window();
            win.Title = "My Window";
            win.Html = "Hello World!";
            
            Coolite.Ext.Web.Panel panel = new Coolite.Ext.Web.Panel();
            panel.Title = "My Panel";
            panel.Height = Unit.Pixel(300);
            panel.Html = "Hello World!";
            
            this.form1.Controls.Add(win);
            this.form1.Controls.Add(panel);
        }
    </script>
    Oddly enough, I think adding a <ext:Window> to another <ext:Window> should work. Let me test... yep, that works! Here's the full code sample...

    Example

    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Window win = new Window();
            win.Title = "My Window";
            win.Html = "Hello World!";
    
            Window win2 = new Window();
            win2.Title = "My Other Window";
            win2.CenterOnLoad = false;
            win2.PageX = Unit.Pixel(100);
            win2.PageY = Unit.Pixel(100);
    
            win.Controls.Add(win2);
            
            Coolite.Ext.Web.Panel panel = new Coolite.Ext.Web.Panel();
            panel.Title = "My Panel";
            panel.Height = Unit.Pixel(300);
            panel.Html = "Hello World!";
            
            this.form1.Controls.Add(win);
            this.form1.Controls.Add(panel);
        }
    </script>
    The above code uses the latest 0.5 build, which includes the new PageX and PageY properties for all Components.

    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 4
    Last Post: Mar 04, 2011, 2:36 PM
  2. Listener in Dynamic windows
    By Dominik in forum 1.x Help
    Replies: 2
    Last Post: May 07, 2010, 10:39 AM
  3. Problem with creating Dynamic Windows on Desktop
    By marcelodecon in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2010, 11:25 AM
  4. Replies: 5
    Last Post: Mar 23, 2010, 5:17 AM
  5. Coolite on Windows Mobile 6.x
    By macap in forum Open Discussions
    Replies: 1
    Last Post: Aug 04, 2009, 10:03 AM

Posting Permissions