Change position of leaf node image

8 posts, 0 answers
  1. Geoffrey
    Geoffrey avatar
    9 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post

    I'm adding an image to a leaf node in code-behind like this:

    rNode.ImageUrl = "images/icon_navflag.gif"

     

    This works fine. Now, I'd like to move the position of the image to the left about 50px within the treeview. How can I do it?

  2. Yana
    Admin
    Yana avatar
    5024 posts

    Posted 01 Jun 2009 Link to this post

    Hi Geoffrey,

    You can set the position of RadTreeNode image with the following css style:

    .RadTreeView .rtImg {
    position: relative;
    left: 50px;
    }

    All the best,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Geoffrey
    Geoffrey avatar
    9 posts
    Member since:
    May 2009

    Posted 01 Jun 2009 Link to this post

    I'm unable to get this to work. That is, the leaf node image does not move to the left when I make the suggested change to the CSS file. Is there an example available that shows how to set the position of an inserted leaf node image? Thanks.
  4. Yana
    Admin
    Yana avatar
    5024 posts

    Posted 02 Jun 2009 Link to this post

    Hi Geoffrey,

    I am not able to understand the needed layout of the treeview, so could you please provide us with a screenshot? Thanks

    Kind regards,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Geoffrey
    Geoffrey avatar
    9 posts
    Member since:
    May 2009

    Posted 03 Jun 2009 Link to this post

    Yes, I have a screenshot that shows the needed layout of the treeview. How do I post an image to this forum?
  6. Yana
    Admin
    Yana avatar
    5024 posts

    Posted 04 Jun 2009 Link to this post

    Hi Geoffrey,

    You're not allowed to attach files in this forum, please use some online storage service to send us the image.

    Best wishes,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Geoffrey
    Geoffrey avatar
    9 posts
    Member since:
    May 2009

    Posted 09 Jun 2009 Link to this post

    OK, it took awhile but here's a link to a JPEG that shows how we need the leaf node images to appear within a treeview:

    http://www.silverchair.com/flags/flags.html

    Notice the position of the "green flags" in the JPEG. Currently, when we add a green flag to a leaf node, it shows up in within the text of the leaf node. For instance, “Bibliographic” is partially obscured by a green flag (something like “Bi[ ]ographic, where [ ] indicates the position of the green flag). That is why we want to be able to move the green flags to the left about 50 px. Hope this is clear.
  8. Yana
    Admin
    Yana avatar
    5024 posts

    Posted 12 Jun 2009 Link to this post

    Hi Geoffrey,

    Actually the images are supposed to be aligned like in the screenshot, please check this online demo, for example.

    I suppose that this is a css issue, could you please send us a simple page or live url where we could observe the problem? Thanks a lot.

    Best wishes,
    Yana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top