Author |
Message |
16/06/2009 08:58:29
|
mreich
Power User
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Hi,
is there a possibility to show popup in the center of the application?
Markus
|
|
|
16/06/2009 10:09:29
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5534
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 |
|
|
16/06/2009 10:21:26
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5534
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 |
|
|
22/06/2009 15:12:38
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5534
Offline
|
solved with 20090622
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
13/02/2020 09:35:34
|
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
|
|
|
13/02/2020 11:37:41
|
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
|
|
|
|