Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treeview custom control in C#.. HEEELPPP!!!

Status
Not open for further replies.

zyanide

Programmer
Mar 13, 2006
2
ES
Hi there,
im developing a custom treeview control based on the usercontrol ..
i've created a property TreeNodes that returns the contained treeview.Nodes collection..
the problem is:
when i click in design view for editing the nodes, it does not display the thumbnailed images from the imagelist attached to the custom control.
Adding manually the index for the imageindex works, but i want to give a professional feeling to the control and show the dropdown list with the thumbnailed images.

the code in the custom control is:

public TreeNodeCollection Nodes
{
get { return this.treeView1.Nodes; }
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public ImageList ImageList
{
get { return this.treeView1.ImageList; }
set { this.treeView1.ImageList = value;}
}

[Editor("System.Windows.Forms.Design.ImageIndexEditor", typeof(System.Drawing.Design.UITypeEditor)),
TypeConverter(typeof(ImageIndexConverter))]
public int ImageIndex
{
get { return this.treeView1.ImageIndex; }
set { this.treeView1.ImageIndex = value; }
}

Thanks in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top