Solved Narrow font for TreeView

Posted on 2012-08-30
Last Modified: 2012-09-03

I have a TreeView where I use long sentences on the nodes - can anyone suggest a narrow fonr that is easy to read
Question by:murbro
    LVL 20

    Accepted Solution

    LVL 26

    Assisted Solution

    by:Alan Warren
    You can set the letter-spacing CSS attribute to a negative value and assign any font-family. - Try it yourself

    <head runat="server">
        <style type="text/css">
          myNarrowStyle {font-family:Arial Narrow, Segoe UI, Arial,sans-serif; font-size:9px;}

    Then populate your treeviewnodes CssClass="myNarrowStyle "

    Lots of narrow fonts available:
    Arial® Narrow Regular

    LVL 26

    Assisted Solution

    by:Alan Warren
    Here's a start, create a CSS style with the same ID as your treeview ID

        <style type="text/css">
          #SampleTreeView {font-family:Arial Narrow, Segoe UI Arial, Arial; font-size:12px;}

    Open in new window

    TreeView narrow font style
    LVL 26

    Expert Comment

    by:Alan Warren
    And here's a bit more:
    <style type="text/css">
          #SampleTreeView {width:500px;font-family:Arial Narrow, Segoe UI Arial, Arial; font-size:32px;}
          .RootNode {background-color:#CCCCFF; }
          .ParentNode {color:Navy; background-color:#33CC33; }
          .Node {color:Orange;font-size:22px; }
          .LeafNode {color:Black;font-size:12px;letter-spacing:0px;}

    Open in new window

    Then in your treeview
            <LeafNodeStyle CssClass="LeafNode" />
            <NodeStyle CssClass="Node" />
            <ParentNodeStyle CssClass="ParentNode" />
            <RootNodeStyle CssClass="RootNode" />

    Open in new window

    Treeview style narrow font for LeafNodeStyle
    LVL 16

    Assisted Solution

    by:Vikram Singh Saini
    You can use M 1m regular font in your case.

    You can download same from: Free Font M+ Fonts

    Author Closing Comment

    Thanks very much

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now