Long label in RadListView in Icons View Type

2 posts, 0 answers
  1. Gérald
    Gérald avatar
    8 posts
    Member since:
    Dec 2010

    Posted 26 Jan 2012 Link to this post


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

    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?

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 31 Jan 2012 Link to this post

    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.

    Ivan Todorov
    the Telerik team

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

  3. DevCraft R3 2016 release webinar banner
Back to Top