cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Alignment of Window

Former Member
0 Kudos

Hi Friends,

Usually when we display a window, it gets displayed in the left, right or centre of the browser according to our settings...

but my requirement is i need a window with some space in left and right end, like our sdn website...

how to acheive this.. Please help me..

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Check Thomas's reply in this thread []

Former Member
0 Kudos

Hi,

Please use method set_window_position of interface if_wd_window to set the position. This method has parameter to set the left, top and position of the window.

RR_WINDOW Type Ref To IF_WD_WINDOW

IV_POS_LEFT TYPE I DEFAULT 200 window's left position

IV_POS_TOP TYPE I DEFAULT 200 window's top position

rr_window = ir_window_manager->create_external_window(

url = iv_url_name

is_resizable = abap_true

has_scrollbars = abap_true

has_statusbar = abap_true ).

"set the window property

rr_window->set_window_position(

left = iv_pos_left

top = iv_pos_top ).

Thanks,

Rahul

Edited by: Rahul Yadav on Jun 1, 2009 11:01 AM

Former Member
0 Kudos

Rahul,

i'm facing some problem with this..

rr_window = ir_window_manager->create_external_window(

url = iv_url_name

is_resizable = abap_true

has_scrollbars = abap_true

has_statusbar = abap_true ).

can u elobrate it...

Former Member
0 Kudos

Hi,

In code snippet, the rr_window is the refrence variable of your window popup.in your case it will be your created window.

you have to call the method to set the position of window.

let me know if i am still missing something.

Thanks,

Rahul

Former Member
0 Kudos

still facing problem.

actually where i have to write coding

arjun_thakur
Active Contributor
0 Kudos

Hi,

Set_window_position method doesn't work properly. Refer SAP Note Number: 1003826.

Regards

Arjun

former_member40425
Contributor
0 Kudos

Hi,

You have to get the reference of window manager before calling method create_external_window.

You can get it as follows.

DATA ir_window_manager TYPE REF TO if_wd_window_manager.
  DATA lo_api_component  TYPE REF TO if_wd_component.
  DATA rr_window         TYPE REF TO if_wd_window.


    lo_api_component  = wd_comp_controller->wd_get_api( ).
    ir_window_manager = lo_api_component->get_window_manager( ).

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

but there is no difference in the output..

its coming as usual in the left side...

please tell how to design window with space in both side as in sdn website

Former Member
0 Kudos

Hi,

Please try this:

set_window_position( position = if_wd_window=>CO_CENTER )

it should work because in my case it is working fine.

Thanks,

Rahul

Former Member
0 Kudos

Still i'm not clear..

please tel where i have to code...

wat is the logic...

Former Member
0 Kudos

Hi,

I am assuming that your window is popup.

You have to write the code at the place where you are creating your window if_wd_window using if_wd_window_manager. Once you have the reference of the window, use set_window_position method to set the window position before opening the window.

Thanks,

Rahul