[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
YESNOPopup show in center  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 744
Offline

Hi,

is there a possibility to show popup in the center of the application?

Markus
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

...status quo: no.

You have a function YESNOPopup.getModalPOpup() and can access the normal popup properties from here but this only allows you to pass pixel values.

In general popups are placed automatically close to the point of last activity. First above then below then right then left. Only if there is not enough space, then the popup is positioned in the middle...

What we can do: allowing a special posX-value/posY-value for centering. Should be in the next update.

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

Code:
 BasePopup.java (base for ModalPopup, ModelessPopup):
 
     /**
      * Special integer value that you can pass into left/top position for indicating
      * that the popup is to be positioned within the center.
      */
     public static int POS_CENTER = 999999;
 
 


Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

solved with 20090622
Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn

I notice that in order to show YESNOPopup in center of application, the solution with POS_CENTER indicated here ist not effective for RISC.

Can you support this centering in RISC?

Regards, Daniel
[WWW]
fhuellmantel

Active

Joined: 02/02/2016 13:57:32
Messages: 7
Offline

Try this:

Code:
 YESNOPopup.createInstance("Headline", "Content", new IYesNoListener() {
 	
 	@Override
 	public void reactOnYes() {
 		//Yes
 	}
 	
 	@Override
 	public void reactOnNo() {
 		//No
 	}
 		
 }).getModalPopup().setLeftTopReferenceCentered(); //centered
 


or for OKPopups:

Code:
 OKPopup.createInstance("Headline", "OK?", () -> System.out.println("OK")).getModalPopup().setLeftTopReferenceCentered(); //centered
 
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team