on 03-09-2009 4:31 AM
Is it possible to add a new line for text in caption in web dyn pro?
In Java, I tried storing the string as "Result.\nPass" but it seems when being displayed, the new line is not shown but it is only shown in one whole line.
Any advise?
Hi Jack
Use TextView UI Element for text/Caption ,now things will work.
wdContext.currentContextElement().setLabel("\n"+"Kumar"+"\n"+"satish"+"\n"+"abc");
We can achieve the solution from LayoutData, but it will make things complicated.
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Good problem is solved.
Your question usage of setLabel? What label is being set when you refer to "currentContextElement()" ?
1Actually for your concern I did one test in my NWDS ,Its a wrong naming convention thats why u confused.
(instead of label i have to use say InputCaption because label is standard used by framework or its common )
2. I have created one context attribute named label and one UI of TextView ,associated its value property to
this context.
and accessed this through currentContextElement()
Best Regards
Satish Kumar
Hi ,
Use String buffer to add it in a new line.
StringBuffer sb = new StringBuffer();
stringBuffer.append("Result");
stringBuffer.append("\n");
stringBuffer.append("Pass");
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
you can write the text spitting in to two line and concatenate operator as
text in online with ' + ' and continue in the next line . or you can even use ' /n '
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.