473,385 Members | 1,798 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,385 software developers and data experts.

Prevent popup of contextmenu

Hi,

My treeview has a contextmenu. Using this menu the user can perform an
action on a node.
However, sometimes I do not want the contextmenu to popup. So I catch the
treeview_popup event, check if the contextmenu is to be shown, and show it
(or not). The only thing working here is to dispose the contextmenu but
then it will never be shown again (since it is disposed).

What is the way to do this?
Thanx,

ROland

--
---
Roland Wolters
http://www.habbiebabbie.net
***** Please react via UseNet only ********
Nov 16 '05 #1
1 1601
I have, in a different situation, saved the context menu away in
another variable, like this.savedContextMenu = myControl.ContextMenu,
then set .ContextMenu = null. Then, later, when it is valid to show the
context menu again, I just reassign myControl.ContextMenu =
this.savedContextMenu.

Nov 16 '05 #2

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

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
4
by: Randy | last post by:
I am trying to right click on a form and have a custom popup menu display. Does anyone know how to do this in vb.net. Thanks!
5
by: Goldsworth_Systems | last post by:
Using VB.Net, I open a form by using the "MouseDown" event of a textbox control (I test to ensure that the right button has been clicked). However, when I do so, the standard popup menu bar (Undo,...
6
by: Eng Teng | last post by:
How do I write a code to activate a popup menu when I right click in a label control? Regards, Tee
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.