This is a migrated thread and some comments may be shown as answers.

Long label in RadListView in Icons View Type

1 Answer 188 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Gérald
Top achievements
Rank 2
Gérald asked on 26 Jan 2012, 06:18 PM
Hi,

I want to use a RadListView in Icons View Type showing long label.
Here is the code :

'
'RadListView1
'
Me.RadListView1.AllowArbitraryItemHeight = True
Me.RadListView1.AllowEdit = False
Me.RadListView1.AllowRemove = False
Me.RadListView1.FullRowSelect = False
Me.RadListView1.GroupItemSize = New System.Drawing.Size(200, 20)
Me.RadListView1.ImageList = Me.ImageList1
ListViewDataItem1.Image = CType(resources.GetObject("ListViewDataItem1.Image"), System.Drawing.Image)
ListViewDataItem1.ImageKey = ""
ListViewDataItem1.Text = "ListViewItem 1 With a long label"
ListViewDataItem1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
ListViewDataItem2.Image = CType(resources.GetObject("ListViewDataItem2.Image"), System.Drawing.Image)
ListViewDataItem2.ImageIndex = 0
ListViewDataItem2.Text = "ListViewItem 2 With a long label"
ListViewDataItem2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
ListViewDataItem3.Image = CType(resources.GetObject("ListViewDataItem3.Image"), System.Drawing.Image)
ListViewDataItem3.ImageIndex = 0
ListViewDataItem3.Text = "ListViewItem 3 With a long label"
ListViewDataItem3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
Me.RadListView1.Items.AddRange(New Telerik.WinControls.UI.ListViewDataItem() {ListViewDataItem1, ListViewDataItem2, ListViewDataItem3})
Me.RadListView1.ItemSize = New System.Drawing.Size(148, 20)
Me.RadListView1.Location = New System.Drawing.Point(329, 34)
Me.RadListView1.Name = "RadListView1"
Me.RadListView1.Size = New System.Drawing.Size(155, 94)
Me.RadListView1.TabIndex = 0
Me.RadListView1.Text = "RadListView1"
Me.RadListView1.ViewType = Telerik.WinControls.UI.ListViewType.IconsView

The problem is when the list size is to small, a scroll bar appears, but an empty space appears too on the top of the list, and the last item of the list becomes hidden (even in scrolling down the list)

The first image shows the list with all items, the second one has too little width (and an empty space on the top), the third shows the list with an invisible item

Could you help me with this?
Thanks

Regards,

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 31 Jan 2012, 09:44 AM
Hello Gérald,

Thank you for contacting us.

It appears that this is an issue in the IconView of RadListView. We will address it in a future release. I have logged it to PITS, so you can subscribe to it and track its progress. Here is the link to the PITS item.

The issue appears only in IconView when the width of the control is smaller that the width of the items. Therefore, to overcome this you can either set a minimum size to the control so that it can't get smaller than the items, set a smaller ItemSize if the controls is of fixed size, or use SimpleView instead of IconView. The SimpleView displays the items vertically stacked which is how the IconView should behave when the width of the control is smaller than the items' width.

You Telerik points have been updated for reporting this issue.

Should you have any additional questions, do not hesitate to contact us.

Regards,
Ivan Todorov
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

Tags
ListView
Asked by
Gérald
Top achievements
Rank 2
Answers by
Ivan Todorov
Telerik team
Share this question
or