cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce Popup Window Size?

Former Member
0 Kudos

Hello All,

I have one popup window, the height of popup window is being displayed too large.

I used method IF_WD_WINDOW->WINDOW_SIZE( ), there are parameters 'Width' and 'Height' of type string, i have passed '30' and also '30%' like formate, it didn't work.

how to control the size of window? Could you please suggest me?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Even we set the size of the pop up window, you do not see the changes. It is because, the type of UI you use in your view. For example Table UI (Width & Height) with 10 coloumn & you set the pop window size height as '30' width as '100'. you do not see the changes. I've tried many ways to set the size but it takes normal default size it is due to yout UI (height & width )on the screen.

Best Regards

Ravi

Former Member
0 Kudos

Hi Chandraprakash,

Use following code to give the size of pop window.





DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component  TYPE REF TO if_wd_component.
DATA lo_popup_window         TYPE REF TO if_wd_window.

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

lo_popup_window = lo_window_manager->create_window(
* your window name
window_name = 'ZPOP'
title = 'POPWindow'
close_in_any_case = abap_false " cancel action in entertainment_view
close_button = abap_true
default_button = if_wd_window=>co_button_ok " Subscribe OK in entertainment_view
button_kind = if_wd_window=>co_buttons_okcancel
).
*Set the height and width here
lo_popup_window->set_window_size( width = '100' height = '100' ).

lo_popup_window->set_remove_on_close( abap_true ).

lo_popup_window->open( ).


or Alternatively

You can reduce the size of POP UP Window size by changing the height and width properties of ROOTUIELEMENTCONTAINER of view, which is embedded in that pop window.

I hope it helps.

Regards,

Rohit

Edited by: Rohit M on Mar 21, 2009 6:50 PM

Former Member
0 Kudos

Hello Rohit,

Actually that popup is confirmation popup, it doesn't have any view kind of thing.

i just passed text to confirmation popup.

see below code, i have passed also width and height but it is not working.

lo_window = lo_win_mgr->create_popup_to_confirm(

text = lt_text

button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_question

window_title = lv_title

window_width = '30'

window_height = '20'

default_button = if_wd_window=>co_button_ok ).

lo_window->open( ).

Former Member
0 Kudos

To be honest i havent found the size parameters working, what you can do though is to RESTRUCTURE the TEXT to be displayed in the pop-up, that would allow you to controll the WIDTH of the pop-up.

in my code sample below l_text table has 2 entries, we can further have more inserts to it to gain height.

You can create pop-up with different text, by extending the below source.

data :  l_cmp_api          type ref to if_wd_component,
          l_window_manager   type ref to if_wd_window_manager,
          l_popup            type ref to if_wd_window,
          l_text             type        string_table,
          l_api              type ref to if_wd_view_controller,
         RR_POPUP_WINDOW type ref to  IF_WD_WINDOW.	
 
  l_cmp_api        = wd_this->wd_get_api( ).
  l_window_manager = l_cmp_api->get_window_manager( ).
 
  insert `Records marked with RED LED contain error into table l_text.
  insert `To proceed processing with errors, select YES for this POP-UP.` into table l_text.
 
 
  rr_popup_window = l_window_manager->create_popup_to_confirm(
                text            = l_text
                button_kind     = if_wd_window=>co_buttons_yesnocancel
                message_type    = if_wd_window=>co_msg_type_warning
                window_title    = 'INFO'
                window_position = if_wd_window=>co_center
                ).                                          "#EC 
 
      rr_popup_window->subscribe_to_button_event(
               button            = if_wd_window=>co_button_yes
               action_name       = 'TO_V_PODETAILS' "action on the view that handles click
               action_view       = ir_view
               is_default_button = abap_true ).
 
RR_POPUP_WINDOW ->open( ).

Greetings

Prashant