473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Custom control

I have made an usercontrol TreeView (cusom). 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?
Best regards
Trond
private void frmFileBrowser_Load(object sender, System.EventArgs e)

{

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

}

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

{

this.ClearTextFields();

}

private void ClearTextFields()

{
txtVer.Text = "";

txtID.Text = "";

txtTag.Text = "";

txtDate.Text = "";

txtTime.Text = "";

txtDuration.Text = "";

}


Nov 16 '05 #1
2 1274
But nothing happends. Anyone?


Nothing happens where? which part?
Nov 16 '05 #2
When i click a node in the treeview control, the this.ClearTextFields();
does not run. So the text in the textboxes are not cleared.
Best regards
Trond

"joeycalisay" <hcalisay@_spamkiller_codex-systems.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
But nothing happends. Anyone?


Nothing happens where? which part?

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
3
by: usha535140 | last post by:
Hi, Can we use Ajax RoundedCornersExtender control with AJax,tabContainer?
2
sanjib65
by: sanjib65 | last post by:
I try to create a custom control that will say, Hello + ComputerUserName. I have added in my App_Code folder a WelcomeLabel.cs file: // WelcomeLabel.cs using System; using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.