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

CSS for RadTreeNode text

3 Answers 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 12 Oct 2010, 04:09 AM
Hi

I am having trouble working out the correct style to add to Radtreenode so that the text is indented after the first line if the text wraps.

Like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

    <title>Untitled Page</title>

       <style> 

      p { 

        text-indent: -2.0em; 

      } 

      div{

            padding:3.0em;

      }

    </style> 

</head>

<body>

<div>

    <p> 

      "On the contrary," said Holmes, quietly, "I have every reason 

      to believe that I will succeed in discovering Mr. Hosmer Angel." 

    </p> 

    <p> 

      Mr. Windibank gave a violent start, and dropped his gloves. 

      "I am delighted to hear it," he said. 

    </p> 

    <p> 

      "It is a curious thing," remarked Holmes, "that a typewriter 

      has really quite as much individuality as a man's handwriting. 

      Unless they are quite new no two of them write exactly alike. 

      Some letters get more worn than others, and some wear only on 

      one side. Now, you remark in this note of yours, Mr. Windibank, 

      that in every case there is some little slurring over the e, and 

      a slight defect in the tail of the r. There are fourteen other 

      characteristics, but those are the more obvious." 

    </p> 

</div>

</body>

</html>

I will need to apply the text-indent: -2.0em;  and padding:3.0em; style to particular elements but i'm not sure what ones.

Cheers

Aaron

           

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 15 Oct 2010, 11:36 AM
Hi Aaron,

I'm not able to understand the question, where the treeview should be placed? Can you please clarify?

All the best,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Aaron
Top achievements
Rank 1
answered on 17 Oct 2010, 10:22 PM
Sorry for the confusion.

The question is "How do I style the Radtreenode text so that text is indented after the first line if it wraps?"

The HTML I posted is an example of what I want, not a page to place the RadTree on.

Take the HTML I posted and open it in a browser, It will show you an example of the indenting I wish to apply via CSS to the RadTreeNode text.

EDIT: I have uploaded an image showing the way I wish the node text to wrap.

Cheers
Aaron
0
Yana
Telerik team
answered on 21 Oct 2010, 02:52 PM
Hello Aaron,

I'm afraid that the image is not attached, but I think I understood the needed approach.

The problem is that the element that holds the text is not a block element, so text-indent cannot be applied to it. That's why I suggest you use a very simple template. I've attached a simple page to demonstrate this, please download it and give it a try.

All the best,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Aaron
Top achievements
Rank 1
Answers by
Yana
Telerik team
Aaron
Top achievements
Rank 1
Share this question
or