on 06-07-2012 10:00 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.