on 05-17-2009 11:38 AM
Hi,
how is the way to do the following.
I intend to open a smal window on button klick.
if_wd_window_manager is the correct Object for such purposes but
I need one where I can state the size of theh window.
Thanks
sw+
Uday thx.
I have implemented the following code:
WIndows size change doesn't take effect although I wirte:
lr_popup->set_window_size( width = '100' height = '100 ).
lr_popup->set_window_size( width = '50' height = '50' ).
lr_popup->set_window_size( width = '20 height = '500' ).
I see always the same size ? Why ?
Coding:
Data: context_node type ref to if_wd_context_node.
data: lr_popup type ref to if_wd_window,
lr_view_controller type ref to if_wd_view_controller.
data: lr_api_comp_controller type ref to if_wd_component,
lr_window_manager type ref to if_wd_window_manager.
lr_api_comp_controller = wd_comp_controller->wd_get_api( ).
lr_window_manager = lr_api_comp_controller->get_window_manager( ).
lr_popup = lr_window_manager->create_window(
modal = abap_true
window_name = 'WND_POPUP'
title = 'My Popup'
close_button = abap_true
message_type = if_wd_window=>co_msg_type_none
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_in_any_case = abap_true ).
lr_popup->set_window_size( width = '500' height = '500' ).
lr_popup->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I dont think that you had read my first reply completely. I had clearly written in that post itself that using set_window_size wouldn't work out. Please read the remainder of the reply to get to know about the reason behind it. Am pasting the same again for you:
But however as per SAP Note Number: 1003826 it isn't possible to achieve the same. You can't set the window size this way. So as a workaround in order to resize your window, you should set the width and height of ROOTUIELEMENTCONTAINER of the view in which you are using component A. There's already quite an interesting discussion & observations being made in this [thread |;by Mathias Maerker. You might be interested in closely watching that thread. Also have a look at Thomas Jung's comments in this [thread|;.
Regards,
Uday
Hi There,
When you use any method of class IF_WD_WINDOW_MANAGER it returns you an parameter of TYPE REF TO IF_WD_WINDOW. Now withing this IF_WD_WINDOW class you have the method SET_WINDOW_SIZE which you would should help you obtain the desired results.
So if you were using somethig like the code snippet shown below you should be able to obtain the desired results:
lr_popup = lr_window_manager->create_window(
modal = abap_true
window_name = 'POPUP_TITLE'
title = 'My Popup'
close_button = abap_true
message_type = if_wd_window=>co_msg_type_none
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_in_any_case = abap_true ).
lr_popup->set_window_size( width = '200' height = '200' ).
But however as per SAP Note Number: 1003826 it isn't possible to achieve the same. You can't set the window size this way. So as a workaround in order to resize your window, you should set the width and height of ROOTUIELEMENTCONTAINER of the view in which you are using component A. There's already quite an interesting discussion & observations being made in this [thread |;by Mathias Maerker. You might be interested in closely watching that thread. Also have a look at Thomas Jung's comments in this [thread|;.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Set_window_size method doesn't work properly. So the way could be if you set the height and width of the ROOTUIELEMENTCONTAINER to a specific size according to your requirement.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
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.