各位C#高手,我编了个小小关于TreeView控件的程序但就是在窗口上显示不出来.帮忙解决下.

在VS.NET 2005 Beta环境下,创建了一个C# Console Application,尝试用TreeView显示目录结构,但未能在窗口中显示。代码中已设置节点并调用PopulateTreeView方法填充子目录,但在运行时遇到问题。可能是控件添加或显示配置方面存在错误,需要检查窗口布局和控件可见性设置。
摘要由CSDN通过智能技术生成

我首先建了个C#console application.然后输入以下程序:

#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows .Forms ;
using System.ComponentModel;
using System.Data ;
using System.Drawing ;
using System.IO ;

#endregion

namespace TreeViewDirectorys
{
 
     public   class TreeViewDirectoryStructureTest:System .Windows .Forms .Form
    {
   private System.Windows.Forms.TreeView directoryTreeView;
   private System.ComponentModel.Container components = null;


   public TreeViewDirectoryStructureTest()
   {
    directoryTreeView = new TreeView();
    directoryTreeView.Location = new System.Drawing.Point(16, 16);
    directoryTreeView.Name = "directorytreeview";
    directoryTreeView.TabIndex = 0;
   

    this.SuspendLayout();

    this.Au

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值