Skip to main content

change SVG text in Midlet

2 replies [Last post]
virtualaudio
Offline
Joined: 2009-04-05

Hi,

i need to change the text example in

text example

Its really easy to change arguments like the x,y values of the text with setTrait, but I haven't found out how to change the text between the tags :(

Kind regards and thank you for helping me out
Andy

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eva_krejcirova
Offline
Joined: 2008-05-05

Hi,

You need to change the #text attribute to change the content of element - e.g.
[code]
SVGElement text = (SVGElement) doc.getElementById("text_id");
text.setTrait("#text", "new text");
[/code]
For more information please see https://meapplicationdevelopers.dev.java.net/uiLabs/changing_text.html

Eva

virtualaudio
Offline
Joined: 2009-04-05

Thank you Eva!!!

I havn't found this little piece of information by myself...don't know why..

Thank you a thousand times :)