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

Change position of leaf node image

7 Answers 109 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Geoffrey
Top achievements
Rank 1
Geoffrey asked on 29 May 2009, 01:34 PM

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?

7 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 01 Jun 2009, 11:14 AM
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.
0
Geoffrey
Top achievements
Rank 1
answered on 01 Jun 2009, 07:41 PM
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.
0
Yana
Telerik team
answered on 02 Jun 2009, 12:01 PM
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.
0
Geoffrey
Top achievements
Rank 1
answered on 03 Jun 2009, 01:37 PM
Yes, I have a screenshot that shows the needed layout of the treeview. How do I post an image to this forum?
0
Yana
Telerik team
answered on 04 Jun 2009, 11:10 AM
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.
0
Geoffrey
Top achievements
Rank 1
answered on 09 Jun 2009, 04:26 PM
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.
0
Yana
Telerik team
answered on 12 Jun 2009, 11:12 AM
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.
Tags
TreeView
Asked by
Geoffrey
Top achievements
Rank 1
Answers by
Yana
Telerik team
Geoffrey
Top achievements
Rank 1
Share this question
or