• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Screen x,y control of a simple pop-up Confirm mini-window. Possible?

Enthusiast ,
Jan 13, 2012 Jan 13, 2012

Copy link to clipboard

Copied

Is it possible to control where on the screen an small confirm pop-up window will appear?

I want not to appear in the middle but next to the right screen side.

Do I need to build it and not use the default confirm window?

TOPICS
Actions and scripting

Views

704

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Jan 14, 2012 Jan 14, 2012

No problem...

var w = new Window('dialog','Confirm');

w.orientation="row";

var tmp =$.screens.toString().split('-');

var screenSize=tmp[1].toString().split(':');

var windowWidth = 270; //adjust to suit

w.frameLocation=[Number(screenSize[0])-windowWidth,Number(screenSize[1])/2];

w.bu1 = w.add('button',undefined,'Ok');

w.bu1.preferredSize=[100,100];

w.bu2 = w.add('button',undefined,'Cancel');

w.bu2.preferredSize=[100,100];

w.bu1.onClick=function(){

w.close(1);

}

var Result = w.show();

if(Result == 1){

    alert("

...

Votes

Translate

Translate
Adobe
Valorous Hero ,
Jan 13, 2012 Jan 13, 2012

Copy link to clipboard

Copied

You would need to create your own window, as an example...

var w = new Window('dialog','Test');

var tmp =$.screens.toString().split('-');

var screenSize=tmp[1].toString().split(':');

var windowWidth = 300; //adjust to suit

w.frameLocation=[Number(screenSize[0])-windowWidth,Number(screenSize[1])/2];

w.t1 = w.add('statictext',undefined,"This is a test");

w.bu1 = w.add('button',undefined,'Cancel');

w.show();

This will create a window with the top of the window half way down the sceen, and to the right of the screen. The only problem is you have to enter a fixed number for the width of the window (var windowWidth = 300;)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 13, 2012 Jan 13, 2012

Copy link to clipboard

Copied

Great!

Is it possible to add to big buttons (as UI or as image) ?

In this case, 2 square buttons - OK and Cancel -  width 100 and H 100

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 14, 2012 Jan 14, 2012

Copy link to clipboard

Copied

LATEST

No problem...

var w = new Window('dialog','Confirm');

w.orientation="row";

var tmp =$.screens.toString().split('-');

var screenSize=tmp[1].toString().split(':');

var windowWidth = 270; //adjust to suit

w.frameLocation=[Number(screenSize[0])-windowWidth,Number(screenSize[1])/2];

w.bu1 = w.add('button',undefined,'Ok');

w.bu1.preferredSize=[100,100];

w.bu2 = w.add('button',undefined,'Cancel');

w.bu2.preferredSize=[100,100];

w.bu1.onClick=function(){

w.close(1);

}

var Result = w.show();

if(Result == 1){

    alert("Ok")

    }else{

        alert("Cancel");

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines