|
-
Jun 8th, 2009, 12:50 PM
#1
Thread Starter
Fanatic Member
[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();
}
-
Jun 8th, 2009, 12:53 PM
#2
Thread Starter
Fanatic Member
Re: Add Custom Control to Custom TreeView
I win the idiot award. I didn't specify the size of the control.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|