Click here to Skip to main content
15,887,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Array declaration without specifying the size. Pin
emran8349-Feb-06 11:53
emran8349-Feb-06 11:53 
GeneralRe: Array declaration without specifying the size. Pin
Judah Gabriel Himango9-Feb-06 12:06
sponsorJudah Gabriel Himango9-Feb-06 12:06 
AnswerRe: Array declaration without specifying the size. Pin
Guffa9-Feb-06 22:16
Guffa9-Feb-06 22:16 
QuestionTriggerring Event Handler and pass variable in PARENT FORM from Child FORM Pin
emran8349-Feb-06 10:30
emran8349-Feb-06 10:30 
Question.NET Framework 2.0 Pin
Manu_819-Feb-06 10:21
Manu_819-Feb-06 10:21 
AnswerRe: .NET Framework 2.0 Pin
emran8349-Feb-06 10:33
emran8349-Feb-06 10:33 
AnswerRe: .NET Framework 2.0 Pin
Judah Gabriel Himango9-Feb-06 10:42
sponsorJudah Gabriel Himango9-Feb-06 10:42 
QuestionDesign time problems with custom TreeView and private node class Pin
Pedro S Ferreira9-Feb-06 10:18
Pedro S Ferreira9-Feb-06 10:18 
Hello,

I've posted this question on MSDN forums, but since I'm lost here, I decided to ask here too. I'm sorry for that.

Here's the problem,

I have a custom TreeView with custom nodes as private nested classes in the TreeView.

The TreeView initialize and add some nodes at construction.

Because my classes are quite long, I'll post only a sample to reproduce the problem.

MyTreeView class:

public partial class MyTreeView : TreeView<br />
    {<br />
        public MyTreeView()<br />
        {<br />
            InitializeComponent();<br />
<br />
            Nodes.Add(new MyTreeNode());<br />
        }<br />
<br />
        private class MyTreeNode : TreeNode<br />
        {<br />
            public MyTreeNode()    :<br />
                base("MyNode")<br />
            {<br />
            }<br />
        }<br />
    }


Each time I use this class in a form at design time, the treeview shows with the added custom nodes, but in the form's InitializeComponent(), I get this:

WindowsApplication2.MyTreeView.MyTreeNode myTreeNode1 = new System.Windows.Forms.TreeNode("MyNode");<br />
this.myTreeView1 = new WindowsApplication2.MyTreeView();


Now this won't compile because the node is private to MyTreeView.

Is there any way to prevent the nodes from showing up at design time?
Or am I doing something wrong?

Thanks!

-- modified at 16:19 Thursday 9th February, 2006
AnswerRe: Design time problems with custom TreeView and private node class Pin
leppie9-Feb-06 10:51
leppie9-Feb-06 10:51 
GeneralRe: Design time problems with custom TreeView and private node class Pin
Pedro S Ferreira9-Feb-06 11:01
Pedro S Ferreira9-Feb-06 11:01 
AnswerRe: Design time problems with custom TreeView and private node class Pin
Pedro S Ferreira10-Feb-06 5:49
Pedro S Ferreira10-Feb-06 5:49 
Questionmenubar on a customised windows' form Pin
dlinks9-Feb-06 8:39
dlinks9-Feb-06 8:39 
QuestionConverting String to Int Pin
zaboboa9-Feb-06 8:34
zaboboa9-Feb-06 8:34 
AnswerRe: Converting String to Int Pin
Andy Moore9-Feb-06 9:16
Andy Moore9-Feb-06 9:16 
GeneralRe: Converting String to Int Pin
zaboboa9-Feb-06 9:33
zaboboa9-Feb-06 9:33 
AnswerRe: Converting String to Int Pin
Judah Gabriel Himango9-Feb-06 9:23
sponsorJudah Gabriel Himango9-Feb-06 9:23 
AnswerRe: Converting String to Int Pin
Peter Vertes9-Feb-06 18:52
Peter Vertes9-Feb-06 18:52 
Questionanimated gif Pin
Manu_819-Feb-06 8:12
Manu_819-Feb-06 8:12 
AnswerRe: animated gif Pin
Dave Kreskowiak9-Feb-06 8:30
mveDave Kreskowiak9-Feb-06 8:30 
QuestionRe: animated gif Pin
shabonaa10-Feb-06 0:21
shabonaa10-Feb-06 0:21 
QuestionUploading/Downloading Word documents into Sql Server using WinForms Pin
Jonesjo9-Feb-06 7:14
Jonesjo9-Feb-06 7:14 
AnswerRe: Uploading/Downloading Word documents into Sql Server using WinForms Pin
Judah Gabriel Himango9-Feb-06 7:51
sponsorJudah Gabriel Himango9-Feb-06 7:51 
GeneralRe: Uploading/Downloading Word documents into Sql Server using WinForms Pin
Jonesjo9-Feb-06 8:41
Jonesjo9-Feb-06 8:41 
GeneralRe: Uploading/Downloading Word documents into Sql Server using WinForms Pin
Judah Gabriel Himango9-Feb-06 9:22
sponsorJudah Gabriel Himango9-Feb-06 9:22 
GeneralRe: Uploading/Downloading Word documents into Sql Server using WinForms Pin
User 66589-Feb-06 10:09
User 66589-Feb-06 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.