Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 29th, 2004, 07:16 AM
Registered User
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Control

I have made an usercontrol TreeView (custom). Then i dragged it from the
toolbar into a form. I then added som code but it does not work (below). Is
it because it is a usercontrol? As you can see from the code below i am
passing filepath to the TreeView.RootFolder.
In OnSelectFile i am "catching" the fact that the user clicked on one of the
nodes in the treeview control. So ClearTextFields() should clear all
textboxes in the form. But nothing happends. Anyone? With nothing i mean that the textboxes are not cleared.
The code is from the book Professional C# 3'rd edition
Best regards
private void frmFileBrowser_Load(object sender, System.EventArgs e)


TreeView1.RootFolder= @"C:\Logfiles\";


private void OnSelectFile(object sender,
System.Windows.Forms.TreeViewEventArgs e)




private void ClearTextFields()


txtVer.Text = "";

txtID.Text = "";

txtTag.Text = "";

txtDate.Text = "";

txtTime.Text = "";

txtDuration.Text = "";


Similar Threads
Thread Thread Starter Forum Replies Last Post
user control in user control prijatelce ASP.NET 2.0 Basics 2 May 2nd, 2008 08:42 AM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
Help with control initialization in user control mike_remember ASP.NET 1.0 and 1.1 Professional 7 December 19th, 2005 11:08 AM
User Control stu9820 ASP.NET 1.0 and 1.1 Basics 20 July 20th, 2004 11:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.