I am having trouble finding the proper data type to store an e.X e.Y coordination values. Code Example Below- The mySelectNode Variable needs to get the selected node coordination what data type would I use to Declare this Variable
/* Get the tree node under the mouse pointer and
save it in the mySelectedNode variable. */
private void treeMnu_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
// this Variable needs a declared Data Type--> mySelectedNode = treeMnu.GetNodeAt(e.X, e.Y);
if (mySelectedNode != null && mySelectedNode.Parent != null)
{
treeMnu.SelectedNode = mySelectedNode;
treeMnu.LabelEdit = true;
if(!mySelectedNode.IsEditing)
{
mySelectedNode.BeginEdit();
}
}
else
{
MessageBox.Show("No tree node selected or selected node is a root node.\n" +
"Editing of root nodes is not allowed.", "Invalid selection");
}
}
Visual Studio Express Editions36
|