on 03-21-2009 12:38 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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( ).
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.