When the text in the StaticTextItem is very long, the text can’t be wrapped, I set the wrap property to true, but it doesn’t take any effect.
Our code is like below:
isc.DynamicForm.create({
ID:"CaseDetailForm",
width:"100%",
numCols:2,
colWidths:["17%", "83%"],
fields:[
{name:"caseName", title:"Case Name",editorType:"staticText"},
{name:"jobName",title:"Job Name", editorType:"staticText"},
{name:"scheduleTime",title:"ScheduleTime",editorType:"staticText"},
{name:"baseLine",title:"Base Line", editorType:"staticText"},
{name:"compareProfile",wrap:true,wrapTitle:false,title:"CompareProfile",wrapTitle:false ,editorType:"staticText"}
]
)
Hi
This is working for me - here’s my (slightly modified) version of your test case that demonstrates wrapping.
The only changes I made were to apply an explicit width of 200 (so a shorter string is required before wrapping occurs), and setting the value for the field to a long string of text.
isc.DynamicForm.create({
ID:"CaseDetailForm",
width:200,
numCols:2,
colWidths:["17%", "83%"],
fields:[
{name:"caseName", title:"Case Name",editorType:"staticText"},
{name:"jobName",title:"Job Name", editorType:"staticText"},
{name:"scheduleTime",title:"ScheduleTime",editorType:"staticText"},
{name:"baseLine",title:"Base Line", editorType:"staticText", wrap:false},
{name:"compareProfile",wrap:true,wrapTitle:false,title:"CompareProfile",wrapTitle:false ,editorType:"staticText"}
],
values:{
compareProfile:"a very very long string to test wrapping."
}
})
If you’re still having problems please let us know with as much detail as you can provide about exactly what’s going wrong
Thanks
Isomorphic Software
This was not working for me either. But when I tried with the example in the post it was working. After 20 minutes of struggle, I found that string in my case had no spaces. (comma separated values) that is why it didn’t wrap.
Just updating this post so that it might help someone else too. BTW is there anything which wraps the text all the time no matter what?
One more question, I have the StaticTextItem with rowSpan as 3. My text is appearing in the center of corresponding cell. I am able to align the title to the top by using titleVAlign: “top” but I didn’t find anything which will align the text to the top. Is there any property to achieve that on StaticTextItem?