private void load_treeview()
{
TreeNode guojia = new TreeNode();
guojia.Text = "国家";
treeView1.Nodes.Add(guojia);
}
在load事件中调用该函数效果如图。怎么文本没有显示出来?求解
解决方案 »
- silverlight能做3D动画什么的不?比如3D人体什么的?
- 网站问题
- 在Microsoft Visual Studio .NET 2003里,我遇到了一个问题:无法调试。无法找到 Microsoft Internet Explorer。哪位高手能帮我解答啊?
- asp.net中怎么样获取前一页地址
- 为何需要按注销两次才能到login.aspx页面
- .Net socket编程-传输文本文件
- 怎么判断一棵treeview的nodes中是否有节点存在呢?
- 请大家帮帮我这个可怜的小女子啊,折磨我3天了。。。。 我找到我的出错信息了,请帮帮忙啊。。
- 第一次用.net做网站,有关登录页面用户登录,退出,其间cookies状态的有效时间,cookies的存储路径,所有的这些我都不知道哦,请指教!:).
- 我在aaa.aspx页面上加了一个usercontrol,如何在别的页面使用Response.Redirect(aaa.aspx)方法时,不显示usercontrol呢?
- 大家进来帮帮忙
- jquery调用ashx的问题
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
TreeNode guojia = new TreeNode();
guojia.Text = "国家";
treeView1.Nodes.Add(guojia);
}
}
}
namespace WindowsFormsApplication1
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region Windows Form Designer generated code /// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.treeView1 = new System.Windows.Forms.TreeView();
this.SuspendLayout();
//
// treeView1
//
this.treeView1.Location = new System.Drawing.Point(35, 23);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(149, 130);
this.treeView1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.treeView1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false); } #endregion private System.Windows.Forms.TreeView treeView1;
}
}这是完整的代码