Skip to Content
author's profile photo Former Member
Former Member

icon on the bushbutton

Hi all,

I want to change the icon on the pushbutton in the runtime, can anyone help me in this regard.

Regards.

Krishna.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2007 at 09:48 AM

    Hi,

    you can do this in your action handler/ wddomodifyview method this way:

    make sure you have your view ( get this in the wddomodifyview and set it as an attribute of your view)

    so you can get it as follows:

    data: lo_button type ref to cl_wd_button.

    lo_button ?= wd_this->m_view->get_element( 'id of the button' ).

    lo_button->set_image_source( 'string of your source' ).

    this way you can update the image source at runtime

    grtz

    Koen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 06:52 AM

    Declare a context attribute of type string, that will hold the name of your icon. eg. ICON_SYSTEM_SAVE etc. Bind the 'Image' property of your button UI element to this context attribute.

    At runtime, set your prefered icon in this attribute, it will work.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.