[CLOSED] Notification - remove moving up

  1. #1

    [CLOSED] Notification - remove moving up

    Hello,

    Is there a way to make the notification show without moving, i.e. in a fixed position? I tried using Frame, but it shows an exploding frame around :S.

    Also, is it possible to remove the gray frame around?

    Thanks
    Last edited by Daniil; Oct 26, 2011 at 7:48 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Well, an Ext Notification is a special class to get a notification with some custom effects.

    To make a simple notification you could use just Ext.Msg.show().
    http://docs.sencha.com/ext-js/3-4/#!...ox-method-show

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void ShowNotification(object sender, DirectEventArgs e)
        {
            X.Js.Call("myNotify");
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    
        <script type="text/javascript">
            var myNotify = function () {
                Ext.Msg.show({
                    modal : false,
                    title : "Title",
                    msg : "Message",
                    listeneres : {
                        click : {
                            fn : function () { alert('sdg');}
                        }
                    }
                });
                Ext.Msg.getDialog().alignTo(Ext.getBody(), "br-br?");
            };
        </script>
    
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Button runat="server" Text="Show a notification" OnDirectClick="ShowNotification" />
        </form>
    </body>
    </html>
  3. #3
    Actually, attached is the exactly layout I was talking about (removing the frame with a white background with square borders).

    Is it possible???

    Thanks
    Attached Thumbnails Click image for larger version. 

Name:	1.png 
Views:	69 
Size:	5.9 KB 
ID:	3370  
  4. #4
    Why not just create your own window with the custom content and show it at position x,y?
  5. #5
    I was able to reproduce using ExtJs.

    In Ext.Net when I set Window's Frame=False, it doesnt seem to work.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void ShowNotification(object sender, DirectEventArgs e)
        {
            X.Js.Call("myNotify");
        }
    </script>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Ext.Net Example</title>
        <ext:ResourcePlaceHolder runat="server" />
        <script type="text/javascript">
            Ext.onReady(function () {
    
                var win = new Ext.Window({
                    frame: false,
                    title: "Hello World",
                    height: 100,
                    width: 200,
                    headerStyle: 'padding: 10px; background-color:#fff; border: 1px solid black; border-bottom: 0px',
                    bodyStyle: 'padding: 20px; background-color:#fff; border: 1px solid black; border-top: 0px'
                });
    
                win.show();
    
            });
    
        </script>
    </head>
    <body> 
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button ID="Button1" runat="server" Text="Show a notification" OnDirectClick="ShowNotification" />
        <ext:Window Frame="false" runat="server" Html="123" />
        </form>
    </body>
    </html>
  6. #6
    I edited my reply ibove.
  7. #7
    The Window class doesn't support "frame : false" on ExtJS level.

    Yes, it looks good, but please try to drag a Window and you understand what I mean. Though you can set Draggable="false" for a Window to disable that function.

    To set up "frame: false;" for an <ext:Window>, please use XFrame.
    <ext:Window runat="server" XFrame="false" />
    It will be rendered as a "frame : false;" config option, i.e. it's a CustomConfig's item.
  8. #8
    I see what you mean by when I drag it. All my windows are non draggable by default.

    That´s it!

    THANKS!!!

Similar Threads

  1. Moving from Coolite to Ext.NET
    By conman in forum Licensing
    Replies: 2
    Last Post: Jun 19, 2012, 3:32 AM
  2. [CLOSED] Remove moving a node VS loading target´s children.
    By RCN in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 14, 2012, 5:11 PM
  3. [CLOSED] Moving items between Two Grids
    By jeremyl in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 07, 2010, 10:14 AM
  4. [CLOSED] Moving between 2 stores
    By CMA in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 17, 2009, 10:55 AM
  5. Grid Panel is Moving
    By mono in forum 1.x Help
    Replies: 0
    Last Post: Mar 17, 2009, 3:15 AM

Posting Permissions