cancel
Showing results for 
Search instead for 
Did you mean: 

Position GUI element in runtime

Former Member
0 Kudos

Hi All

I would like to positioning popup window relativ to a GUI element (InputField). How can I read the element position?? That is possible, the generic value helper are positioned relativ to linked element. I would like pisitioning my popup window similiary but i dont know how

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi,

you can try following:

IWDWindowInfo _windowInfo = wdComponentAPI.getComponentInfo().findInWindows("<WINDOW_NAME>");
IWDWindowManager manager = wdComponentAPI.getWindowManager();
IWDWindow _window = manager.createWindow(_windowInfo, true);
((IWindow)_window).setWindowPositionControl( "<CONTROL_ID>" );

<CONTROL_ID> - "<COMPONENT_ID>.<VIEW_NAME>.<UI_CONTROL_ID>" (for example "PFCBCNPF.POSearchCriteriaCV.SearchButton")

To get it you need to view HTML sources of your generated view in browser, for example "<a ... id="PFCBCNPF.POSearchCriteriaCV.SearchButton"...>"

pay attention that it is NOT documented feature (setWindowPositionControl method) and you are using it at your own risk.

Regrads, Maxim R.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks a lot:)

I have to exactly read.

That really works:)

regards Bogdan

Former Member
0 Kudos

Thank you for your help:)

unfortunately IWDWindow interface have not method setWindowPositionControl May be I have old version?

Best regards Bogdan R

Former Member
0 Kudos

Hi Rokosa

Type cast the IWDWindow object to IWindow and try.

you will be getting setWindowPositionControl method.

ex: IWDWindow iwdWindow= ...

((IWindow) iwdWindow).setWindowPositionControl(..)

Kishore

former_member182372
Active Contributor
0 Kudos

That is the trick: you cast not to IWDWindow but to IWindow.