on 12-18-2007 2:49 PM
Hi,
I want to overwrite a Label Text.
The Text I want to overwrite comes from a bound Context Node.
Before I want to overwrite it I need the current Text, because I want to change Labels dynamically - however to get the actual Text I use Method GET_TEXT of Class CL_WD_LABEL but this Method sets some Attributes (which seems to be an error for my understanding of OO Concepts) anyway it seems not possible to overwrite the Text with Method SET_TEXT after calling GET_TEXT method (GET_TEXT will call the Bound Attribute after 1st call).
Any ideas?
TIA,
Sebastian
Hi Sebastian.
Why don't you just create a context attribute of type string and bind this to the labels text property.
Then you just have to set this attribute each time the text should change.
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sebasdian.
Maybe I do not get you .... how many lables do you wanna change?
If you just want to set one label you only need one context attribute. And you do not have to create it at runtime. You can create it at design time ... and setting this context attribute at runtime with the current text it should display is quiet easy and dynamic -> internally it does nothing else then call set_text I guess..
But if you do not know how much labels you want to change at design time you are right ... then you need something more dynamic
Cheers,
Sascha
Hi,
I want to change n-Lables
And I want to do it like that: Loop at every Labels of a View and Replace every Occurance of "Oracle" with "SAP" (for example)
But if the Label I want to change the text for is bound to a Context Element with an DDIC-Type the GET_TEXT Method (which I need for dynamic text changes) will set Parameters in the Label class which will always will get the old text (on next GET_TEXT call) never mind what text I assigned with SET_TEXT.
But without a GET_TEXT I will not get all "Oracle" lables and so I can't replace the Texts I want to.
Hope I could explain my Prob
Regards,
Sebastian
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.