Can not add image to Winform radTreeView ImageList

11 posts, 0 answers
  1. Thaneavin Khieu
    Thaneavin Khieu avatar
    1 posts
    Member since:
    Nov 2007

    Posted 23 Nov 2007 Link to this post

    I am using the Winform radTreeView. I am trying to add small PNG file (16x16) into the ImageList during design time. When press the Add button and choose an image from the file browser I get this error dialog that says this:

    Parameter must be of type.
    Parameter name: value

    Is there something I have missed? i have set the color depth to 32 bit since it is a PNG file.


    Thanks,
    -TK

  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 27 Nov 2007 Link to this post

    Hello Thaneavin Khieu,

    I tried to reproduce the issue that you mention, but to no avail. Could you share the exact steps that you take before getting the error?

    It would be best if you can send us  a sample project that demonstrates the problem, so that we can investigate it locally. You can do so in a new support ticket.


    Sincerely yours,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. andreas
    andreas avatar
    7 posts
    Member since:
    Jan 2008

    Posted 25 Jan 2008 Link to this post

    hello!

    i've got the same problem! i can't add any kind of image (jpg. png, gif, ...) to the imgelist because i get the same error as above...

    thanks, ab
  5. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 28 Jan 2008 Link to this post

    Hi Andreas,

    In order to help you I will need you to elaborate a bit more on the following topics:
    1. The version of RadControls for WinForms that are you using (e.g. Q3 2007)
    2. The properties of the images that you are adding to the image list (Size, Type,  etc)
    3. Steps or piece of code that can help us reproduce the error.
    Thank you for your cooperation.

    Regards,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. carisch
    carisch avatar
    7 posts
    Member since:
    Jul 2007

    Posted 06 Feb 2008 Link to this post

    I'm getting the same errors also.  I've tried .jpg and .gif.  This is all at design time, not through code.  Can't send you any details other than the steps.  I'm on Q2 2007 I believe.


    Brian.
  7. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 07 Feb 2008 Link to this post

    Hello Brian,

    Any information about this issue will help identify and address it sooner. Could you please send us the steps that you take in order to get the error in design time.

    Are you experiencing this issue with just the Q2 2007 version or with other versions of RadControls for WinForms too?

    We are looking forward to your response.

    Sincerely yours,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. kiran
    kiran avatar
    36 posts
    Member since:
    May 2008

    Posted 28 May 2008 Link to this post

    i am using Q1 2008. While adding images to nodes i am getting the same error.

    Steps:

    1) i opened images collection window from     ImageList->Images(Collection)
    2) clicked on Add
    3)openFileDialog box opened
    4) Selected a 16x16 color .jpg image
    5) clicked on open button
    6) then i got the error like 
                "Parameter must be of type image".
                 Parameter name:value 

    My requirement is : Instead of Node text i want to display a image.

    is it possible with RAD controls?

    thanks in advance for your help?


    regards,
    kiran 
  9. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 28 May 2008 Link to this post

    Hi kiran,

    Yes, you can have a node with just an image. To do that set the ImageIndex or Image property and set the Text property to empty string as shown below:

    RadTreeNode newNode = new RadTreeNode(string.Empty, 1, -1); 
    //can also be done like that: 
    //newNode.ImageIndex = 1; 
    //newNode.Text = string.Empty; 
    this.radTreeView1.Nodes.Add(newNode); 

    Regarding the strange error at design time, please tell us if you have more than one versions of RadControls for WinForms installed. What Telerik assemblies do you have in GAC? What Visual Studio add-ins do you have installed?

    I hope this helps. If you have any further questions, contact me.

    Regards,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. kiran
    kiran avatar
    36 posts
    Member since:
    May 2008

    Posted 29 May 2008 Link to this post

    Hi Jordan,

    Thanks for your prompt reply.

    The error was resolved now. Actually it is because of adding the images directly to the default image list. I have not added any winforms imagelist to the tree view.
     
    A small query:

    If we added far images to all the nodes , will it be possible to align all the images in a line(straight vertical line). and will it be possible to place a vertical line on all the tree view node far images(aligned)?

    Thanks in advance,

    Regards,
    Kiran
  11. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 30 May 2008 Link to this post

    Hello kiran,

    If you are not using RadTreeView in RTL(Right To Left) mode, then nodes are left aligned. If the tree view is used in RTL mode, its nodes are right aligned. Also, you can have the RadTreeView show lines by setting the ShowLines property to true.

    I am not sure I completely understand what you mean by "to place a vertical line on all the tree view node far images(aligned)". A simple diagram (or a picture made with MS Paint will do too) will make things much clearer.

    I'm looking forward to your response.

    All the best,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 18 Mar 2011 Link to this post

    Hi guys,

    Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out.
    For more information about this release, please refer to this blog post.
     
    Regards,
    Stefan
    the Telerik team
Back to Top
UI for WinForms is Visual Studio 2017 Ready