Results 1 to 2 of 2

Thread: [RESOLVED] Add Custom Control to Custom TreeView

  1. #1

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Resolved [RESOLVED] Add Custom Control to Custom TreeView

    I have a custom control that is a progress indicator, similar to the System.Windows.Forms.ProgressBar that continuously loops until its told to stop.

    I also have a class that inherits from the System.Windows.Forms.TreeView class, the reason I did this was so that I could have my custom control be displayed while loading the TreeView on a background worker.

    However, when I try to add the custom control in the inherited TreeView class I cannot for the life of me get the custom control to get displayed either in the design mode layout or in runtime. If I add a Button or any other .NET control it get's displayed.

    I am attempting to add the control to the TreeView by using the constructor. Any advice would be great.

    Code:
            /// <summary>
            /// Initializes a new instance of the <see cref="GxTreeView"/> class.
            /// </summary>
            public GxTreeView()
            {
                InitializeComponent();
    
                 _CircularProgress = new CircularProgress();
                
                Controls.Add(_CircularProgress);
    
                _CircularProgress.BringToFront();
            }

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  2. #2

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: Add Custom Control to Custom TreeView

    I win the idiot award. I didn't specify the size of the control.

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width