By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

REPOST : Context Menu

P: n/a

I have several context menus added to my form. The form is displaying items
in listviews connected to the context menus. When I click on an item in a
list view, a popup context menu shows allowing me to chese between editing
or deleting the item from the list view. That works fine.

However, in addition to calling the context menu on Click, I can call it
also by RightClick which causes application to either freeze, crash, call
Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to show
only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click but
MouseDown is not supported event for menu items of which my popup context
menu consists.

Any help will be appreciated,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com

Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Dino M. Buljubasic" <dino.buljubasic([no spam])@rivusglobal.com>
schrieb

I have several context menus added to my form. The form is
displaying items in listviews connected to the context menus. When I
click on an item in a list view, a popup context menu shows allowing
me to chese between editing or deleting the item from the list view.
That works fine.

However, in addition to calling the context menu on Click, I can call
it also by RightClick which causes application to either freeze,
crash, call Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to
show only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click
but MouseDown is not supported event for menu items of which my popup
context menu consists.


Usually the contextmenu is only shown when the right mouse button is
released. Did you try it?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
Thanks Armin,

I fixed this one. The problem was that I was calling explicitly the context
menu on ListView.Click event. That is why I was getting it both ways, by
left and right clicking on my list view.

Regards,
Dino

--
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eh**************@TK2MSFTNGP10.phx.gbl...
"Dino M. Buljubasic" <dino.buljubasic([no spam])@rivusglobal.com>
schrieb

I have several context menus added to my form. The form is
displaying items in listviews connected to the context menus. When I
click on an item in a list view, a popup context menu shows allowing
me to chese between editing or deleting the item from the list view.
That works fine.

However, in addition to calling the context menu on Click, I can call
it also by RightClick which causes application to either freeze,
crash, call Delete context menu two times, etc.

How can I solve this problem? Or how to limit pop up context menu to
show only when left clicked on an item.

Some people are recommending me to do MouseDown instead of Click
but MouseDown is not supported event for menu items of which my popup
context menu consists.


Usually the contextmenu is only shown when the right mouse button is
released. Did you try it?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.