10-18-2017 5:41 AM
Hi..
I wanted to know how to erase a picture displayed in the screen dynamically.
I am displaying a picture in the screen using container. When I press a button picture will be displayed on that container. But if i press the button for the second time , Pictures displayed will be overlapped , and creates problem while scrolling. One of the image remains fixed , and another moves along with the scrolling bar.
Please help me to solve this problem.
Thank you...
10-18-2017 6:03 AM
hi can u follow below steps
1.when button clicked:
under button action perform free object of picture and container.
2. where pbo of screen to display picture.
create every time objects of container and picture.
use method of CL_GUI_PICTURE is like below
CALL METHOD GO_PIC1->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
then u can get dynamic display of picture
10-18-2017 6:03 AM
hi can u follow below steps
1.when button clicked:
under button action perform free object of picture and container.
2. where pbo of screen to display picture.
create every time objects of container and picture.
use method of CL_GUI_PICTURE is like below
CALL METHOD GO_PIC1->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
then u can get dynamic display of picture
10-18-2017 6:11 AM
here i am giving sample code.
PBO.
DATA:LV_STATE TYPE I.
IF <CON_OBJ> is not initial.
LV_STATE = <CON_OBJ>->IS_ALIVE( ).
ENDIF.
check LV_STATE < 0 or <CON_OBJ> is initial.
<write here container object creation>
<write here picture object creation>
CALL METHOD <PIC_OBJ>->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
PAI.
IF SY-UCOMM = '<BUTTON ACTION>'.
<PIC_OBJ>->FREE( ).
<CON_OBJ>->FREE( ).
ENDIF.
10-18-2017 11:24 AM
Thanks a lot...This method works perfect for a single picture.
But in my case I am displaying 3 pictures in the screen using 3 different picture object and single container object.
Now only the 3rd picture is getting erased , whereas 1st and 2nd picture get overlapped with a empty picture. Is there any other solution other than creating 3 separate containers for 3 pictures.
I also wanted to know what is the difference between clear and free in this case.
Thank you.
10-19-2017 4:57 AM
10-19-2017 4:58 AM
10-19-2017 5:29 AM
10-18-2017 6:45 AM
Please tell us how you display a "picture using container"? Which class for the image? Which type of container?
Could you please attach a screen capture too, because I don't understand how the scrollbar with one fixed image and one normal image look like?
10-18-2017 6:50 AM
In the PBO, when the picture must be changed or removed you can use the method clear_picture before calling set_display_mode and the required load_picture_from_* method
10-18-2017 12:22 PM
class for image : CL_GUI_PICTURE
container : type ref tocl_gui_custom_container.
I am trying to display 3 images in a subscreen which has a scroll bar.