Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creation of DLL library Pin
Ronald Boucher28-Jun-04 6:41
sussRonald Boucher28-Jun-04 6:41 
QuestionDoubleClick a TreeView Node? Pin
j1e1g128-Jun-04 3:08
j1e1g128-Jun-04 3:08 
AnswerRe: DoubleClick a TreeView Node? Pin
Nick Parker28-Jun-04 3:41
protectorNick Parker28-Jun-04 3:41 
AnswerRe: DoubleClick a TreeView Node? Pin
Dave Kreskowiak28-Jun-04 3:43
mveDave Kreskowiak28-Jun-04 3:43 
GeneralRe: DoubleClick a TreeView Node? Pin
j1e1g128-Jun-04 4:05
j1e1g128-Jun-04 4:05 
GeneralRe: DoubleClick a TreeView Node? Pin
Dave Kreskowiak28-Jun-04 4:34
mveDave Kreskowiak28-Jun-04 4:34 
GeneralRe: DoubleClick a TreeView Node? Pin
j1e1g128-Jun-04 4:46
j1e1g128-Jun-04 4:46 
GeneralRe: DoubleClick a TreeView Node? Pin
Heath Stewart28-Jun-04 4:36
protectorHeath Stewart28-Jun-04 4:36 
Because DoubleClick is not of type TreeViewEventHandler, it is of type EventHandler, as the documentation would tell you if you read it.

You can get the TreeNode that was double-clicked like so:
this.treeView1.DoubleClick += new EventHandler(treeView1_DoubleClick);
//...
private void treeView1_DoubleClick(object sender, EventArgs e)
{
  Point p = PointToClient(MousePosition);
  TreeNode node = GetNodeAt(p);
  if (node != null)
  {
    // Do something with the TreeNode that was double-clicked.
  }
}
If you want to use the Enter key instead (really, it's better to use both), then handle the KeyDown event and get the select node using the TreeView.SelectedNode property.

If you want to know what events, methods, and properties are available for the TreeView, then you really should read the class documentation. See TreeView Members[^] in the .NET Framework SDK. The only true way to learn what all is available is to read.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: DoubleClick a TreeView Node? Pin
j1e1g128-Jun-04 4:51
j1e1g128-Jun-04 4:51 
GeneralRe: DoubleClick a TreeView Node? Pin
Heath Stewart28-Jun-04 5:07
protectorHeath Stewart28-Jun-04 5:07 
AnswerRe: DoubleClick a TreeView Node? Pin
Serge Lobko-Lobanovsky28-Jun-04 4:28
Serge Lobko-Lobanovsky28-Jun-04 4:28 
QuestionHow to set ActiveWindow in PowerPoint 2003...?? Pin
Member 94012528-Jun-04 2:56
Member 94012528-Jun-04 2:56 
AnswerRe: How to set ActiveWindow in PowerPoint 2003...?? Pin
Heath Stewart28-Jun-04 5:04
protectorHeath Stewart28-Jun-04 5:04 
GeneralAtributes Pin
Sharpoverride28-Jun-04 2:01
Sharpoverride28-Jun-04 2:01 
GeneralRe: Atributes Pin
Corinna John28-Jun-04 2:37
Corinna John28-Jun-04 2:37 
GeneralRe: Atributes Pin
Stefan Troschuetz28-Jun-04 2:50
Stefan Troschuetz28-Jun-04 2:50 
GeneralAuthenticate against localhost and AD Pin
michalJ28-Jun-04 1:55
michalJ28-Jun-04 1:55 
GeneralRe: Authenticate against localhost and AD Pin
Nick Parker28-Jun-04 3:12
protectorNick Parker28-Jun-04 3:12 
GeneralProblem on terminating an application Pin
Ravikumar_mv27-Jun-04 22:30
Ravikumar_mv27-Jun-04 22:30 
GeneralRe: Problem on terminating an application Pin
Stefan Troschuetz27-Jun-04 23:10
Stefan Troschuetz27-Jun-04 23:10 
GeneralRe: Problem on terminating an application Pin
Ravikumar_mv27-Jun-04 23:57
Ravikumar_mv27-Jun-04 23:57 
GeneralRe: Problem on terminating an application Pin
Stefan Troschuetz28-Jun-04 0:28
Stefan Troschuetz28-Jun-04 0:28 
GeneralRe: Problem on terminating an application Pin
Dave Kreskowiak28-Jun-04 4:22
mveDave Kreskowiak28-Jun-04 4:22 
GeneralRe: Problem on terminating an application Pin
Ravikumar_mv29-Jun-04 23:03
Ravikumar_mv29-Jun-04 23:03 
GeneralNo data found when exporting dataset to excel Pin
Anonymous27-Jun-04 22:22
Anonymous27-Jun-04 22:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.