Expand and collapse ('-' and '+') is not shown

3 posts, 0 answers
  1. Raj Sharma
    Raj Sharma avatar
    7 posts
    Member since:
    Jan 2010

    Posted 03 Feb 2010 Link to this post


    I have created a control derived from Telerik.WinControls.UI.RadTreeView (Latest trial version)

    I am also creating the RadTreeNode on fly..

    I am setting below properties at runtime.

    groupTreeView.AllowArbitaryItemHeight =

    true;

     

     

     groupTreeView.AllowPlusMinusAnimation = 

    true;

     

     

     groupTreeView.DropFeedbackColor = 

    Color.Black;

     

     

     groupTreeView.Enabled = 

    true;

     

     

     groupTreeView.ExpandAnimation =

    ExpandAnimation.Opacity;

     

     

     groupTreeView.Focusable =

    true;

     

     

     

    groupTreeView.PlusMinusAnimationStep = 10;

     

    groupTreeView.ShowExpandCollapse =

    true;

     

     

     groupTreeView.ToggleMode =

    ToggleMode.SingleClick;

     

     

     groupTreeView.UseNewLayoutSystem =

    true;

    but this does not show me the Expand(+) and collapse(-) sign.


    Note my TreeViewXML..
    <?xml version="1.0" encoding="utf-16"?>
    <TreeView xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UseDefaultSelection="true" AllowDragDrop="true" AllowPlusMinusAnimation="true" ThemeName="Office2007Black" AllowDrop="true" BackColor="Window" DropFeedbackColor="Red" LineColor="ActiveCaption">
    </TreeView>
    Please help..

     

     

     

     

  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 08 Feb 2010 Link to this post

    Hi Raj Sharma,

    When inheriting from RadTreeView you also need to override ThemeClassName property and return the full name of the RadTreeView type. For example:

     

    public class MyTreeView : RadTreeView
    {
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadTreeView).FullName;
            }
     
            set
            {
                base.ThemeClassName = value;
            }
        }
    }

    The expand collapse images are most likely not being shown because they are set through styles and the themes for RadTreeView are not valid for your type. Overriding the ThemeClassName property should do the trick. Please write again if you have other questions.

    Sincerely yours,
    Victor
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Raj Sharma
    Raj Sharma avatar
    7 posts
    Member since:
    Jan 2010

    Posted 12 Feb 2010 Link to this post

    thanks a lot.. things have started working as expected...

Back to Top