on 04-23-2009 12:02 AM
Hi all,
I was trying to increase the size of a dynamically created textview.Is it possible to set the width of a textview in webdynpro?
Thanks
Kukku
Hi,
Try this code:
IWDTextView txtView = (IWDTextView)view.createElement(IWDTextView.class, "text_view");
txtView.setWidth("Your_Desired_width");
txtView.setDesign(WDTextViewDesign.HEADER3);
If you already have the text view created then you can get that particulat textview and can use the same API's, Use this code:
IWDTextView txtView = (IWDTextView)view.getElement("NAME_OF_YOUR_TEXT_VIEW");
txtView.setWidth("Your_Desired_width");
txtView.setDesign(WDTextViewDesign.HEADER3);
This will solve your issue. Please revert back incase you want any further assistance.
Thanks and Regards
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kukku,
if you want to textview dyamicaly change then you should pass the with size before excuting your
wdDoModify() method.
in wdDoMoodifyView()
//static int ii=0; this one defined un othr ond endd block in below
textSize=textSize+5;
public wdDoMoodifyView(.IWDView View..........boolean firstTime){
IWDTextView text=null;
if(firstTime)
text=(IWDTextView)view.createElement(IWDTextView.class,"name view");
}
text.setWidth(textSize);
}
@other begin
static int textSize=5
@end
thanks
jati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.