Hi, guys
i am having issue with ListView items.
Too large text in the item does not fit into width, please see 001.png.
it can be solved by setting TextWrap = true for SimpleListViewVisualItem inherited class
but, i will get the result shown on 002.png, where we have too big item height and second item does not seems to be shown correctly ("Q7" word is not shown).
I have figured out, if the string length does fit into ListViewItem width, it might miss last word of item text.
If I disable images for ListViewItem, then i can see last word of item text. see image 003.png
anyway, i cannot fix first item height.
i have checked this one
http://www.telerik.com/community/forums/winforms/listview/item-height-issue.aspx
but it does not help too much.
i am using Telerik WinForms version: 2013.2.724.40
the source code project is available for download here:
http://yadi.sk/d/6Ro68KCoGfNEm
Look forward for your ideas!
Thank you!
i am having issue with ListView items.
Too large text in the item does not fit into width, please see 001.png.
it can be solved by setting TextWrap = true for SimpleListViewVisualItem inherited class
protected
override
void
SynchronizeProperties()
{
base
.SynchronizeProperties();
Cars car = (Cars)Data.Value;
this
.Text =
"<html><br><br><br><br><br><span style=\"color:#141718;font-size:14.5pt;\">"
+ car.Model +
"</span>"
;
this
.element1.Text =
"<html><span style=\"color:#010102;font-size:10.5pt;font-family:Segoe UI Semibold;\">"
+
"ABS:"
+ (car.ABS ?
"<span style=\"color:#13224D;font-family:Segoe UI;\">YES"
:
"<span style=\"color:#D71B0E;\">NO"
) +
"</span>"
+
"<br>ESR:"
+ (car.ESR ?
"<span style=\"color:#13224D;font-family:Segoe UI;\">YES"
:
"<span style=\"color:#D71B0E;\">NO"
) +
"</span>"
+
"</span>"
;
this
.TextAlignment = ContentAlignment.TopLeft;
this
.ImageAlignment = ContentAlignment.TopLeft;
//this fixes issue from 001.png
this
.TextWrap =
true
;
}
but, i will get the result shown on 002.png, where we have too big item height and second item does not seems to be shown correctly ("Q7" word is not shown).
I have figured out, if the string length does fit into ListViewItem width, it might miss last word of item text.
If I disable images for ListViewItem, then i can see last word of item text. see image 003.png
private void listView_ItemDataBound(object sender, ListViewItemEventArgs e)
{
//comment this to fix last word showing
e.Item.Image = (Image)Resources.ResourceManager.GetObject(((Cars)e.Item.Value).ImageFileName);
}
anyway, i cannot fix first item height.
i have checked this one
http://www.telerik.com/community/forums/winforms/listview/item-height-issue.aspx
but it does not help too much.
i am using Telerik WinForms version: 2013.2.724.40
the source code project is available for download here:
http://yadi.sk/d/6Ro68KCoGfNEm
Look forward for your ideas!
Thank you!