473,405 Members | 2,167 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,405 software developers and data experts.

Changing ContextMenu

Hello,
I have several ContextMenus and I want to connect them to the GridControl's
ContextMenu property depending on the row that was right clicked. Is there
an event that is raised just before the ContextMenu is displayed? (In Delphi
we used to have the ContextPopup event and we could change the ContextMenu
there.)
What is the best way to achieve this?

Libby
Apr 25 '06 #1
3 2488
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is where
you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
Hello,
I have several ContextMenus and I want to connect them to the
GridControl's
ContextMenu property depending on the row that was right clicked. Is there
an event that is raised just before the ContextMenu is displayed? (In
Delphi
we used to have the ContextPopup event and we could change the ContextMenu
there.)
What is the best way to achieve this?

Libby

Apr 25 '06 #2
Thanks... But what if, as I said, I'm using several ContextMenus and
switching betwwen them? Do I have to populate each one of them with the same
event handler for popup? Wouldn't it be much less cumbersome if only the
component they are attached to raise the event?
Does anyone know if there is such event that the component raise?

"Michael Sander" <sp**@h3c.de> wrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is where you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
Hello,
I have several ContextMenus and I want to connect them to the
GridControl's
ContextMenu property depending on the row that was right clicked. Is there an event that is raised just before the ContextMenu is displayed? (In
Delphi
we used to have the ContextPopup event and we could change the ContextMenu there.)
What is the best way to achieve this?

Libby


Apr 25 '06 #3
Guess then you will need to use the mousedown-event...

Or create one single, empty contextmenu. on every popup you clear it and
merge it with the correct contextmenu.

But usual practice is (at least for me) to put alle the items in one
contextmenu and disable or hide the ones not needed on popup.
"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:On**************@TK2MSFTNGP05.phx.gbl...
Thanks... But what if, as I said, I'm using several ContextMenus and
switching betwwen them? Do I have to populate each one of them with the
same
event handler for popup? Wouldn't it be much less cumbersome if only the
component they are attached to raise the event?
Does anyone know if there is such event that the component raise?

"Michael Sander" <sp**@h3c.de> wrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is

where
you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
> Hello,
> I have several ContextMenus and I want to connect them to the
> GridControl's
> ContextMenu property depending on the row that was right clicked. Is there > an event that is raised just before the ContextMenu is displayed? (In
> Delphi
> we used to have the ContextPopup event and we could change the ContextMenu > there.)
> What is the best way to achieve this?
>
> Libby
>
>



Apr 25 '06 #4

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

Similar topics

0
by: MD | last post by:
I have a ContextMenu that is assigned to 3 RichTextBox's (i.e., if you right-click on any of the 3 RichTextBox's, you get the same ContextMenu). My ContextMenu has 2 items, each of which have their...
0
by: ilPostino | last post by:
Does anyone know how to change the cursor on a ContextMenu? thanks
2
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to...
2
by: Zieben | last post by:
Hello! I have such problem! I have my UserControl. I override property ContextMenu for this Control as ..... new ContextMenu ContextMenu{ set {_contextMenu = value;}
0
by: cemino | last post by:
Hi, I got a problem with ContextMenu. I'm using a hot-key (like Ctrl-B) to show contextMenu in my program. Things is like below: contextMenu.Show(Form1, New...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
7
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To...
11
by: Graham Charles | last post by:
I'm writing a control inheriting from ComboBox, and I'd like to add an entry to the ContextMenu for that combo box. I have no problem if I create an entirely new ContextMenu from scratch, but I'd...
3
by: asharda | last post by:
Hi, I am trying to create a context menu in my application. The context menu takes menu otems from an XML file. In XAML the code is <Grid.ContextMenu> <ContextMenu Name="cm" StaysOpen="true"...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.