cancel
Showing results for 
Search instead for 
Did you mean: 

Increase the size of textview

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

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

Former Member
0 Kudos

In which version does the TextView "width" property exist?

Armin

pravesh_verma
Active Contributor
0 Kudos

Hi Armin,

I am working on CE 7.1. the exact version is: 7.1 SP05 PAT0000.

Thanks and Regards

Pravesh

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

No, don't use static variables like that.

Armin