RightClick
Moderators: SDS, support, admin
RightClick
Hello,
I’d like to proceed the defined window by me after right click.
See the attached picture, please.
That picture is to follow your window for selecting something after right click.
In my case, I want to change to follow defined window which is made by me after right click.
Let me know please.
I’d like to proceed the defined window by me after right click.
See the attached picture, please.
That picture is to follow your window for selecting something after right click.
In my case, I want to change to follow defined window which is made by me after right click.
Let me know please.
- Attachments
-
- rightclick.jpg (126.66 KiB) Viewed 28317 times
Re: RightClick
Hello,
To replace the existing context menu items with the custom ones, use the following XML code:
Each menu item has two events - OnClick and OnPopup. The OnClick event fires when user clicks on the custom menu item with the mouse. The OnPopup event fires when the custom menu pops up on the screen.
Sender (optional parameter) is a pointer to the sender object which raises the event (say OnClick, it's the context menu item). onClick and onPopup (optional parameter) are method pointers, they take the actual addresses of the methods which are supposed to be event handlers in your code for the OnClick and OnPopup events, respectively. Given the fact that Sender and onPopup are optional parameters, you may omit them and specify only the address of the OnClick event handler, for example:
Mikhail
To replace the existing context menu items with the custom ones, use the following XML code:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<contextmenu mode="0">
<items>
<item Caption="Menu Item 1" Sender="$00000000" onClick="$00000000" onPopup="$00000000"/>
</items>
</contextmenu>
</cadsofttools>
Sender (optional parameter) is a pointer to the sender object which raises the event (say OnClick, it's the context menu item). onClick and onPopup (optional parameter) are method pointers, they take the actual addresses of the methods which are supposed to be event handlers in your code for the OnClick and OnPopup events, respectively. Given the fact that Sender and onPopup are optional parameters, you may omit them and specify only the address of the OnClick event handler, for example:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<contextmenu mode="0">
<items>
<item Caption="Menu Item 1" onClick="$00000000"/>
</items>
</contextmenu>
</cadsofttools>
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: RightClick
Thank you for your explanation.
I'd like to know exactly 'onClick'.
Let me know, please.
Thanks,
I'd like to know exactly 'onClick'.
Let me know, please.
Thanks,
Re: RightClick
Hello,
To run the OnClick event use the code mentioned above
You can change the Menu Item 1 to the required item.
To run the OnClick event use the code mentioned above
As a result you'll get a Menu Item 1 listed in the Context menu Window:<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2">
<contextmenu mode="0">
<items>
<item Caption="Menu Item 1" onClick="$00000000"/>
</items>
</contextmenu>
</cadsofttools>
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">
<Results>
<Result Instruction="OnMenuContextClick" Type="event" guid="{D468D130-40F2-4294-A8F9-2C31A0BD12F3}">
<Output caption="&Menu Item 1" index="0"/>
</Result>
</Results>
</cadsofttools>
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support