question about popup notification

Sciter Forums Layout question about popup notification

This topic contains 3 replies, has 2 voices, and was last updated by  Something else 4 months, 2 weeks ago.

  • Author
  • #49357

    Something else

    i have 2 questions : to change the popup notification from the bottom right to the middle of the screen

    var (w,h) =,#border);
        // getting **declared** margins widths, note: they can be different from computed ones due to margin collapsing
        w += msg.toPixels(,#width);
        h += msg.toPixels(,#height);
        // position its border box at bottom / right corner of the screen
    	      msg.move( screenX2 - (w + 600), 
                  screenY2 - (h + 400), 
                  #detached-topmost-window );
        // request to start animation revealIt ); to change the appearance effect to fade or any other effect close to it
    thank you

    • This topic was modified 4 months, 2 weeks ago by  Andrew.
  • #49360



    element.move( x, y, #screen, #detached-topmost-window );

    positions element in separate window on screen.

    x and y here are screen coordinates (that #screen symbol).

    screenX1, screenX2, screenY1, screenY2 are coordinates of left,right,top,bottom corners of current screen (monitor box on desktop).

    So you need to compute x and y (left/top) corner of element’s box in the way it appears in the center of the screen.

    Use basic arithmetic (+,-,*,/) operations to solve that mystery. If I am not mistaken that is second grade of primary school. At least it was so in country named USSR.

  • #49361

    Something else

    lol 😀 yes i did it but i was little afraid if someone has screen with different resolution it would show the notification in different positions (Simply i wanted to confirm something 🙂 )
    thank u

  • #49363

    Something else

    and the appearance effect is
    i don’t know what’s wrong with me 🙂 … next time i will search more before i ask

You must be logged in to reply to this topic.