cancel
Showing results for 
Search instead for 
Did you mean: 

Re-sizing Pop-up Window

shwetars
Advisor
Advisor
0 Kudos

Hello Colleagues,

I have a created a pop-up window reference in the wdoinit method of my controller using the method create_window() of the if_wd_window_manager class.

I also call the method setWindowSize() on the if_wd_window class using the reference returned by the previoud method.

On click of a button in one of my views I open the window but the window would have reset to default size.

Could someone here give me a solution for this ?

Regards,

Shweta

Accepted Solutions (0)

Answers (3)

Answers (3)

thomas_szcs
Active Contributor
0 Kudos

Hi Shweta,

Specifying the size of a window or its position has currently no effect in Web Dynpro ABAP - not even to the minimum size. The size of a popup is determined automatically at runtime and the content is displayed as having no scrollbars.

Best regards,

Thomas

shwetars
Advisor
Advisor
0 Kudos

Sorry I forgot to mention I was refering to the ABAP version.

Following is the sample code I have written to test this problem:

METHOD onactionopen_window .

DATA: lc_api_component TYPE REF TO if_wd_component,

lc_window_manager TYPE REF TO if_wd_window_manager,

lc_window TYPE REF TO if_wd_window,

lc_api_view TYPE REF TO if_wd_view_controller.

lc_api_component = wd_comp_controller->wd_get_api( ).

lc_window_manager = lc_api_component->get_window_manager( ).

CALL METHOD lc_window_manager->create_window

EXPORTING

window_name = 'TEST_WIN'

title = 'Test Window'

RECEIVING

window = lc_window.

CALL METHOD lc_window->set_window_size

EXPORTING

width = '100'

height = '100'.

lc_window->open( ).

ENDMETHOD.

I am testing it in QPT client 004. The component name is ZWD_55_WINDOW.

Regards,

Shweta

Former Member
0 Kudos

Shweta,

By design setWindowSize defines only <b>minimal</b> window size. So if you set 100x100 but your content is bigger, then window will have size to fit content (more then 100px by either direction).

If this is the case, then everything works as expected.

Try to wrap content of corresponding view inside ScrollContainer and set explicit height and width on this container.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi,

you can use the other variation of setWindowSize(WDCssSize Width,WDCssSize Height)

Regards,

Saravanan K