<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Back ground image in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961311#M1156699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can check out for the code from SAP.. transaction BIBS ( only available in the ECC 6.0 version)&lt;/P&gt;&lt;P&gt;BIBS -&amp;gt; Controls Library -&amp;gt; picture Conctrol -&amp;gt; Screen Display.&lt;/P&gt;&lt;P&gt;I am attaching the code just in case u work in a  version lower than ECC 6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

program sap_picture_demo.

set screen 200.

TYPE-POOLS cndp.

************************************************************************
* CLASS    c_event_receiver
* DEFINITION
************************************************************************
class c_event_receiver definition.
* The class is used to test the events raised by the cl_gui_picture
* class
  public section.
    methods event_handler_picture_dblclick
            for event picture_dblclick of cl_gui_picture
            importing mouse_pos_x mouse_pos_y sender.
    methods event_handler_context_menu
            for event context_menu of cl_gui_picture
            importing sender.
    methods event_handler_context_menu_sel
            for event context_menu_selected of cl_gui_picture
            importing fcode sender.
  endclass.


************************************************************************
* DATA
************************************************************************
  data function like sy-ucomm.         " OK-Code field in screen 200
  data url  type cndp_url.                " URL-field in screen 200
  data url2 type cndp_url.               " URL-field in screen 200
  data picture_control_1 type ref to cl_gui_picture.
  data picture_control_2 type ref to cl_gui_picture.
  data container_1 type ref to cl_gui_custom_container.
  data container_2 type ref to cl_gui_custom_container.
  data event_receiver  type ref to c_event_receiver.
  data event_tab type cntl_simple_events.
  data event_tab_line type cntl_simple_event.
  data return type i.

************************************************************************
* PBO
* before_output
************************************************************************
module before_output output.
  set pf-status 'MAIN0001'.
  IF PICTURE_CONTROL_1 IS INITIAL.

* Create controls
    create object container_1
      exporting container_name = 'PICTURE_CONTROL_1'.
    create object container_2
      exporting container_name = 'PICTURE_CONTROL_2'.

    CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
    CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.

* Register the events
    EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_PICTURE_DBLCLICK.
    append EVENT_TAB_LINE to EVENT_TAB.
    EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_CONTEXT_MENU.
    append EVENT_TAB_LINE to EVENT_TAB.
 EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_CONTEXT_MENU_SELECTED.
    append EVENT_TAB_LINE to EVENT_TAB.

    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_REGISTERED_EVENTS
      exporting
        EVENTS = event_tab.

    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_REGISTERED_EVENTS
      exporting
        EVENTS = event_tab.

* Create the event_receiver object and set the handlers for the events
* of the picture controls
    create object event_receiver.
    set handler event_receiver-&amp;gt;event_handler_picture_dblclick
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_context_menu
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_context_menu_sel
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_picture_dblclick
                FOR PICTURE_CONTROL_2.
    set handler event_receiver-&amp;gt;event_handler_context_menu
                FOR PICTURE_CONTROL_2.
    set handler event_receiver-&amp;gt;event_handler_context_menu_sel
                FOR PICTURE_CONTROL_2.

* Set the display mode to 'normal' (0)
    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.

* Set 3D Border
    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_3D_BORDER
       exporting border = 1.
    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_3D_BORDER
       exporting border = 1.


* new async implementation since 4.6C
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
  EXPORTING
    OBJID                       = 'HTMLCNTL_TESTHTM2_SAP_AG'
    LIFETIME                    = cndp_lifetime_transaction
  IMPORTING
    URL                         = url
  EXCEPTIONS
    OTHERS                      = 1.

* Load the picture by using the url generated by the data provider.
    if sy-subrc = 0.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;LOAD_PICTURE_FROM_URL_ASYNC
         exporting url = url.
    endif.

CALL FUNCTION 'DP_PUBLISH_WWW_URL'
  EXPORTING
    OBJID                       = 'DEMOWORD97SAPLOGO'
    LIFETIME                    = cndp_lifetime_transaction
  IMPORTING
    URL                         = url2
  EXCEPTIONS
    OTHERS                      = 1.

* load image
    if sy-subrc = 0.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;LOAD_PICTURE_FROM_URL_async
         exporting url = url2.
    endif.

  endif.
endmodule.


************************************************************************
* PAI
* after_input
************************************************************************
module after_input input.
  case function.
* At the end of the program destroy the control
    when 'BACK'.
      CALL METHOD container_1-&amp;gt;FREE.
      CALL METHOD container_2-&amp;gt;FREE.
      leave to screen 0.

* Change the display mode
    when 'NORMAL'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    when 'STRETCH'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
    when 'FIT'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
    when 'NORMAL_CTR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
    EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
    EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
    when 'FIT_CTR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
      EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
      EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.

* Clear the picture
    when 'CLEAR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;CLEAR_PICTURE.

* Load a new picture
    when space.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;LOAD_PICTURE_FROM_URL
           exporting url = url
           importing result = return.
      call method cl_gui_cfw=&amp;gt;flush.
      if return = 0.
        url = text-000.
      endif.

  endcase.

  clear function.
endmodule.


************************************************************************
* CLASS   c_event_receiver
* IMPLEMENTATION
************************************************************************
CLASS C_event_receiver implementation.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_picture_dblclick
************************************************************************
  METHOD EVENT_HANDLER_PICTURE_DBLCLICK.
*        for event picture_dblclick of c_picture_control
*        importing mouse_pos_x mouse_pos_y.
    DATA pos_x(5) type c.
    DATA pos_y(5) type c.
    pos_x = mouse_pos_x.
    pos_y = mouse_pos_y.

    IF SENDER = PICTURE_CONTROL_1.
      MESSAGE I000(0K) WITH
        'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
    else.
      MESSAGE I000(0K) WITH
        'DoubleClick' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
    endif.
  endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu
************************************************************************
  METHOD EVENT_HANDLER_CONTEXT_MENU.
    data menu type ref to cl_ctmenu.
    create object menu.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      fcode = text-001
      TEXT = TEXT-001.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-002
      TEXT = TEXT-002.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-003
      TEXT = TEXT-003.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-004
      TEXT = TEXT-004.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-005
      TEXT = TEXT-005.

    CALL METHOD SENDER-&amp;gt;DISPLAY_CONTEXT_MENU
      EXPORTING CONTEXT_MENU = MENU.
  endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu_sel
************************************************************************
  METHOD EVENT_HANDLER_CONTEXT_MENU_sel.
    DATA DISPLAY_MODE TYPE I.
    IF FCODE = TEXT-001.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    ENDIF.
    IF FCODE = TEXT-002.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
    ENDIF.
    IF FCODE = TEXT-003.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
    ENDIF.
    IF FCODE = TEXT-004.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
    ENDIF.
    IF FCODE = TEXT-005.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.
    ENDIF.
    CALL METHOD SENDER-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = DISPLAY_MODE.

  endmethod.

endclass.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mansi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Dec 2008 11:34:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-15T11:34:04Z</dc:date>
    <item>
      <title>Back ground image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961310#M1156698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys ,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I have a back ground image on the screen(dialog program).... If can, could any one help me out in solving &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandu Reddy Sunkari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have posted  same query in UI division,,, however didnt get any reply so posting it in general section...sorry for reposting it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 10:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961310#M1156698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T10:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961311#M1156699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can check out for the code from SAP.. transaction BIBS ( only available in the ECC 6.0 version)&lt;/P&gt;&lt;P&gt;BIBS -&amp;gt; Controls Library -&amp;gt; picture Conctrol -&amp;gt; Screen Display.&lt;/P&gt;&lt;P&gt;I am attaching the code just in case u work in a  version lower than ECC 6.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

program sap_picture_demo.

set screen 200.

TYPE-POOLS cndp.

************************************************************************
* CLASS    c_event_receiver
* DEFINITION
************************************************************************
class c_event_receiver definition.
* The class is used to test the events raised by the cl_gui_picture
* class
  public section.
    methods event_handler_picture_dblclick
            for event picture_dblclick of cl_gui_picture
            importing mouse_pos_x mouse_pos_y sender.
    methods event_handler_context_menu
            for event context_menu of cl_gui_picture
            importing sender.
    methods event_handler_context_menu_sel
            for event context_menu_selected of cl_gui_picture
            importing fcode sender.
  endclass.


************************************************************************
* DATA
************************************************************************
  data function like sy-ucomm.         " OK-Code field in screen 200
  data url  type cndp_url.                " URL-field in screen 200
  data url2 type cndp_url.               " URL-field in screen 200
  data picture_control_1 type ref to cl_gui_picture.
  data picture_control_2 type ref to cl_gui_picture.
  data container_1 type ref to cl_gui_custom_container.
  data container_2 type ref to cl_gui_custom_container.
  data event_receiver  type ref to c_event_receiver.
  data event_tab type cntl_simple_events.
  data event_tab_line type cntl_simple_event.
  data return type i.

************************************************************************
* PBO
* before_output
************************************************************************
module before_output output.
  set pf-status 'MAIN0001'.
  IF PICTURE_CONTROL_1 IS INITIAL.

* Create controls
    create object container_1
      exporting container_name = 'PICTURE_CONTROL_1'.
    create object container_2
      exporting container_name = 'PICTURE_CONTROL_2'.

    CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
    CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.

* Register the events
    EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_PICTURE_DBLCLICK.
    append EVENT_TAB_LINE to EVENT_TAB.
    EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_CONTEXT_MENU.
    append EVENT_TAB_LINE to EVENT_TAB.
 EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=&amp;gt;EVENTID_CONTEXT_MENU_SELECTED.
    append EVENT_TAB_LINE to EVENT_TAB.

    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_REGISTERED_EVENTS
      exporting
        EVENTS = event_tab.

    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_REGISTERED_EVENTS
      exporting
        EVENTS = event_tab.

* Create the event_receiver object and set the handlers for the events
* of the picture controls
    create object event_receiver.
    set handler event_receiver-&amp;gt;event_handler_picture_dblclick
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_context_menu
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_context_menu_sel
                FOR PICTURE_CONTROL_1.
    set handler event_receiver-&amp;gt;event_handler_picture_dblclick
                FOR PICTURE_CONTROL_2.
    set handler event_receiver-&amp;gt;event_handler_context_menu
                FOR PICTURE_CONTROL_2.
    set handler event_receiver-&amp;gt;event_handler_context_menu_sel
                FOR PICTURE_CONTROL_2.

* Set the display mode to 'normal' (0)
    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.

* Set 3D Border
    CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_3D_BORDER
       exporting border = 1.
    CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_3D_BORDER
       exporting border = 1.


* new async implementation since 4.6C
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
  EXPORTING
    OBJID                       = 'HTMLCNTL_TESTHTM2_SAP_AG'
    LIFETIME                    = cndp_lifetime_transaction
  IMPORTING
    URL                         = url
  EXCEPTIONS
    OTHERS                      = 1.

* Load the picture by using the url generated by the data provider.
    if sy-subrc = 0.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;LOAD_PICTURE_FROM_URL_ASYNC
         exporting url = url.
    endif.

CALL FUNCTION 'DP_PUBLISH_WWW_URL'
  EXPORTING
    OBJID                       = 'DEMOWORD97SAPLOGO'
    LIFETIME                    = cndp_lifetime_transaction
  IMPORTING
    URL                         = url2
  EXCEPTIONS
    OTHERS                      = 1.

* load image
    if sy-subrc = 0.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;LOAD_PICTURE_FROM_URL_async
         exporting url = url2.
    endif.

  endif.
endmodule.


************************************************************************
* PAI
* after_input
************************************************************************
module after_input input.
  case function.
* At the end of the program destroy the control
    when 'BACK'.
      CALL METHOD container_1-&amp;gt;FREE.
      CALL METHOD container_2-&amp;gt;FREE.
      leave to screen 0.

* Change the display mode
    when 'NORMAL'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    when 'STRETCH'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
    when 'FIT'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
           EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
    when 'NORMAL_CTR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
    EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
    EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
    when 'FIT_CTR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;SET_DISPLAY_MODE
      EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.
      CALL METHOD PICTURE_CONTROL_2-&amp;gt;SET_DISPLAY_MODE
      EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.

* Clear the picture
    when 'CLEAR'.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;CLEAR_PICTURE.

* Load a new picture
    when space.
      CALL METHOD PICTURE_CONTROL_1-&amp;gt;LOAD_PICTURE_FROM_URL
           exporting url = url
           importing result = return.
      call method cl_gui_cfw=&amp;gt;flush.
      if return = 0.
        url = text-000.
      endif.

  endcase.

  clear function.
endmodule.


************************************************************************
* CLASS   c_event_receiver
* IMPLEMENTATION
************************************************************************
CLASS C_event_receiver implementation.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_picture_dblclick
************************************************************************
  METHOD EVENT_HANDLER_PICTURE_DBLCLICK.
*        for event picture_dblclick of c_picture_control
*        importing mouse_pos_x mouse_pos_y.
    DATA pos_x(5) type c.
    DATA pos_y(5) type c.
    pos_x = mouse_pos_x.
    pos_y = mouse_pos_y.

    IF SENDER = PICTURE_CONTROL_1.
      MESSAGE I000(0K) WITH
        'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
    else.
      MESSAGE I000(0K) WITH
        'DoubleClick' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
    endif.
  endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu
************************************************************************
  METHOD EVENT_HANDLER_CONTEXT_MENU.
    data menu type ref to cl_ctmenu.
    create object menu.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      fcode = text-001
      TEXT = TEXT-001.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-002
      TEXT = TEXT-002.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-003
      TEXT = TEXT-003.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-004
      TEXT = TEXT-004.
    call method menu-&amp;gt;ADD_FUNCTION exporting
      FCODE = TEXT-005
      TEXT = TEXT-005.

    CALL METHOD SENDER-&amp;gt;DISPLAY_CONTEXT_MENU
      EXPORTING CONTEXT_MENU = MENU.
  endmethod.

************************************************************************
* CLASS   c_event_receiver
* METHOD  event_handler_context_menu_sel
************************************************************************
  METHOD EVENT_HANDLER_CONTEXT_MENU_sel.
    DATA DISPLAY_MODE TYPE I.
    IF FCODE = TEXT-001.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL.
    ENDIF.
    IF FCODE = TEXT-002.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_STRETCH.
    ENDIF.
    IF FCODE = TEXT-003.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT.
    ENDIF.
    IF FCODE = TEXT-004.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_NORMAL_CENTER.
    ENDIF.
    IF FCODE = TEXT-005.
      DISPLAY_MODE = CL_GUI_PICTURE=&amp;gt;DISPLAY_MODE_FIT_CENTER.
    ENDIF.
    CALL METHOD SENDER-&amp;gt;SET_DISPLAY_MODE
         EXPORTING DISPLAY_MODE = DISPLAY_MODE.

  endmethod.

endclass.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mansi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 11:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961311#M1156699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T11:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961312#M1156700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mansi ,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the code ... I ll be trying it out ,,, if any problem i ll surely update here ,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandu reddy sunkari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 09:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961312#M1156700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T09:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground image</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961313#M1156701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mansi. i read your tutorial on how to include image in a dalog (screen)...&lt;/P&gt;&lt;P&gt;however, i cant follow it where to place your codes either in PAI or PBO...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please detailed it further of make a screenshots where to place the codes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you so much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2009 09:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-image/m-p/4961313#M1156701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-24T09:08:54Z</dc:date>
    </item>
  </channel>
</rss>

