Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Best way to store user pref's Pin
Khanh Duy21-Jun-05 16:34
Khanh Duy21-Jun-05 16:34 
GeneralRe: Best way to store user pref's Pin
Drew Stainton21-Jun-05 18:57
Drew Stainton21-Jun-05 18:57 
GeneralPDF images to Tif Pin
robia21-Jun-05 2:05
robia21-Jun-05 2:05 
GeneralRe: PDF images to Tif Pin
Drew Stainton21-Jun-05 19:02
Drew Stainton21-Jun-05 19:02 
GeneralTreeview control Pin
Anonymous21-Jun-05 1:19
Anonymous21-Jun-05 1:19 
GeneralRe: Treeview control Pin
mav.northwind21-Jun-05 2:08
mav.northwind21-Jun-05 2:08 
GeneralRe: Treeview control Pin
Anonymous21-Jun-05 2:33
Anonymous21-Jun-05 2:33 
GeneralRe: Treeview control Pin
mav.northwind21-Jun-05 3:35
mav.northwind21-Jun-05 3:35 
I guess I see what you want, although you should really describe in more detail what your problem is, so people wanting to help don't have to guess every detail...

You have a context menu on the TreeView and when you right-click the TreeView, the node you've clicked on seems to be selected, but the TreeView's SelectedNode property returns a different node, right?

If that's your problem, then add a popup event handler to your context menu and set the selected node yourself:
TreeNode nd = treeView1.GetNodeAt(treeView1.PointToClient(Cursor.Position));
if (nd != null)
    treeView1.SelectedNode = nd;
In the menuitem Click handler you can then simply write
treeView1.SelectedNode.Nodes.Add(new TreeNode("A new node"));
Regards,
mav
Generalprogram Pin
mhmo21-Jun-05 1:15
mhmo21-Jun-05 1:15 
GeneralRe: program Pin
mav.northwind21-Jun-05 2:02
mav.northwind21-Jun-05 2:02 
GeneralRe: program Pin
mhmo21-Jun-05 2:53
mhmo21-Jun-05 2:53 
GeneralRe: program Pin
J4amieC21-Jun-05 2:08
J4amieC21-Jun-05 2:08 
GeneralIn Depth Knowledge required Pin
Member 186032521-Jun-05 1:13
Member 186032521-Jun-05 1:13 
GeneralRe: In Depth Knowledge required Pin
Marc Clifton21-Jun-05 2:27
mvaMarc Clifton21-Jun-05 2:27 
GeneralC# Text file to PDF Pin
cyberhound21-Jun-05 1:09
cyberhound21-Jun-05 1:09 
GeneralRe: C# Text file to PDF Pin
occcy21-Jun-05 4:15
occcy21-Jun-05 4:15 
GeneralDynamic Forms Pin
Alper Camel21-Jun-05 1:05
Alper Camel21-Jun-05 1:05 
GeneralRe: Dynamic Forms Pin
mav.northwind21-Jun-05 2:07
mav.northwind21-Jun-05 2:07 
GeneralRe: Dynamic Forms Pin
Alper Camel21-Jun-05 23:00
Alper Camel21-Jun-05 23:00 
GeneralRe: Dynamic Forms Pin
Michael P Butler21-Jun-05 4:22
Michael P Butler21-Jun-05 4:22 
GeneralRe: Dynamic Forms Pin
Alper Camel21-Jun-05 23:05
Alper Camel21-Jun-05 23:05 
GeneralC# to VB.NET Pin
utsav_verma21-Jun-05 0:35
utsav_verma21-Jun-05 0:35 
GeneralRe: C# to VB.NET Pin
Dave Kreskowiak21-Jun-05 5:46
mveDave Kreskowiak21-Jun-05 5:46 
GeneralRe: C# to VB.NET Pin
Dave Doknjas21-Jun-05 15:33
Dave Doknjas21-Jun-05 15:33 
QuestionC#.NET - How to interact with another form? Pin
OhMyGoat20-Jun-05 22:02
OhMyGoat20-Jun-05 22:02 

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.