473,790 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview from XML and Context Menus.

I have an app that populates a treeview from an XML file. I want to
create a few different context menus that pop up depending on which
node is selected. I can get one context menu to appear when I right
click a node but when I try to add code to check the node and then
choose the appropriate context menu nothing happens. The following is
a code snippet I'm using:

Select Case clicknode.text
Case "Apples"
ContextMenu1.Sh ow(TreeView1, clickpoint)
Case "Oranges"
ContextMenu2.Sh ow(TreeView1, clickpoint)
End Select

Any help would be appreciated.
Jul 21 '05 #1
0 1003

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

Similar topics

2
4577
by: Trond Hoiberg | last post by:
Let say i have a bunch of files. Logfiles that is stored in subfolders. Folder1 --logfile1 --logfile2 --logfile3 Folder2 --logfile1 --logfile2 I want to display these files using data from the files in an TreeView
5
1562
by: A-PK | last post by:
Hi, I am using treeview as my menu. my menu is like the following + Users & Groups - Users -Groups + Departmenuts - Engineering
1
1441
by: Rory | last post by:
Hi - I've seen quite a few posts that almost match this but haven't found a solution that works. I have an explorer-like application with a treeview in the lefthand pane. When I right-click on a node, a context menu appears. How can I get different context menus to appear depending on which node is chosen. Here's my existing code: Private Sub treeView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)...
0
893
by: Jon Masterson | last post by:
I have something curious happening which must be due to my lack of knowledge. I have a treeview and a context menu associated with it which provides entries to add items to the tree. This is triggered by the mouse down event. I then added drag and drop so that the entries could be moved around. If I reight click for the contect menu when I click to add something the item drag event fires hanging everything up. If I add items via...
0
767
by: Rory | last post by:
I have an app that populates a treeview from an XML file. I want to create a few different context menus that pop up depending on which node is selected. I can get one context menu to appear when I right click a node but when I try to add code to check the node and then choose the appropriate context menu nothing happens. The following is a code snippet I'm using: Select Case clicknode.text Case "Apples" ContextMenu1.Show(TreeView1,...
5
9501
by: Dotnet Gruven | last post by:
With this TreeView declaration: <asp:TreeView ID="Cloner" runat="server" SelectedNodeStyle-Font-Bold="true" SelectedNodeStyle-ForeColor="#003E21" OnTreeNodePopulate="PopulateNode" OnSelectedNodeChanged="SelectNode" ExpandDepth="0">
0
905
by: MichaelY | last post by:
I'm using the 2.0 TreeView, and thus far have been able to get most everything out of it I need (context menus on nodes, lazy loading, etc.). However, there is a scenario in which I'm not sure what route to take. That is: 1. Refreshing the tree from the client side (without a post back - this is important) - better yet, refreshing a specific node and all of it's children. I've looked at the TreeView.js file that is pulled out of the...
0
1089
by: Bill | last post by:
Is it possible to have different contect menus for each node in a TreeView control. I see lots of examples on how to do this using Windows Forms, but the the webcontrol does not seem to support the mouse_up and mouse_down events. I can set a context menu for the entire Tree no problem, I just define a value for the "onContextMenu" attribute. but I can't seem to find a way to do this for each node.
4
6374
by: John Dann | last post by:
I'm trying to implement a fairly simple Treeview procedure but running into problems. My Treeview has just two levels of nodes: top-level and one child level. I want a doube-click on the Treeview to do one of two things: If the double-click was on a top-level node then the default action of exapnding/collapsing the node should be allowed as usual and with no further action.
0
10413
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.