Skip to Content

Dynamically set an explanation text for a button?

Hi, is there anyone who knows if it's possible to set an explanation text dynamically for a button?

I would like to give the user different help texts for different buttons. Button number one in my view could both be a button for action A and action B which is set dynamically (different actions are called depending certain circumstances). But I also would like to give the user different explanations /help text when the user points with the mouse over the button. It's not possible to bind this property to a context attribute, I have to give an OTR text. Could I set this OTR text dynamically in any method, which method?

Anyone who knows if it's possible?

Thank you and regards Lena

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2012 at 09:22 AM

    Hi Lena,

    WDDOMODIFYVIEW is the method where you have to do any modification on the view. You do as following.

    1. Create an attribute in the context which stores whether button action is A or B.

    2. In wddomodifyview check whether its A or B.

    3. Get the reference to the button as follows.

    data:

    but type ref to cl_wd_button.

    but = view->get_element ( 'BUTTON_NAME' ).

    but->set_tooltip( ) <---------- You can set the tooltip of the button

    Regards,

    Fareez

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2012 at 09:24 AM

    hI

    1. I think the best way is to use the tool tip.

    2. The tooltip is one of the propertiers of the button.

    3. Bind the tooltip attribute to context and use OTR to change the text

    4. To change the properties of a UI element you have to put your code in WDDOMODIFYVIEW

    of the view controller

    regards

    yuval peery

    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.