05-01-2009 4:00 PM
Hey guys,
whats that crap with specifing the width / height of a dynpro in lines and columns?
I try to find a value for the "extension" parameter of cl_gui_docking_container constructor.
What I want to achieve is that this parameter is filled with the current dynpro width (or height if I dock the container on top). But all I have is the current number of columns from sy-scols (or lines from sy-srows). The extension parameter can use millimeters or pixels but not columns or lines.
Can anyone tell me how to convert columns (rows) to millimeters?
Thanks in advance for all answers!
Best regards,
Torben
05-01-2009 4:44 PM
Hi Torben,
Though it sound a bit wird to me to set docking container to entire screen width/height, it is still feasible and if this is the requirement...
You can get ratio of docking container to its residing screen. Then multiply it accordingly and set new extension:
DATA: r_dock TYPE REF TO cl_gui_docking_container.
CALL SCREEN 100.
MODULE pbo OUTPUT.
DATA: perc TYPE i,
extension TYPE i VALUE 100.
CREATE OBJECT r_dock
EXPORTING
side = cl_gui_docking_container=>dock_at_left
extension = extension.
r_dock->get_ratio( IMPORTING ratio = perc ).
extension = 100 * extension / perc.
r_dock->set_extension( extension ). "entire width of the screen
ENDMODULE. "pbo OUTPUT
Regards
Marcin
05-01-2009 4:44 PM
Hi Torben,
Though it sound a bit wird to me to set docking container to entire screen width/height, it is still feasible and if this is the requirement...
You can get ratio of docking container to its residing screen. Then multiply it accordingly and set new extension:
DATA: r_dock TYPE REF TO cl_gui_docking_container.
CALL SCREEN 100.
MODULE pbo OUTPUT.
DATA: perc TYPE i,
extension TYPE i VALUE 100.
CREATE OBJECT r_dock
EXPORTING
side = cl_gui_docking_container=>dock_at_left
extension = extension.
r_dock->get_ratio( IMPORTING ratio = perc ).
extension = 100 * extension / perc.
r_dock->set_extension( extension ). "entire width of the screen
ENDMODULE. "pbo OUTPUT
Regards
Marcin