This is a migrated thread and some comments may be shown as answers.

Rad Context menu over parts of Image

2 Answers 112 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Karan
Top achievements
Rank 1
Karan asked on 05 Feb 2008, 02:33 AM
Hi,

I have a emf image, on which I want to create certain hot spots such that when the mouse is clicked on one of the hot spot the context menu shows up

Kindly let me know what type of control can I use for this purpose to set as the target for the Context menu

e.g.
 <telerik:ContextMenuControlTarget ControlID = "Hotspot1" />

I cant use ImageMaps as the individual maps dont carry an ID
(problem setting it as a targer)

When I use an empty div, the context menu only shows up when clicked on the border and on the text in the div, I want the div to be empty such that the image behind can be seen at all times, I dont want to fill in the Div with spaces as the image will be scaled, same problem with Panels

Any help is appreciated, thanks in advance
Regards
KaranHi,

I have a emf image, on which I want to create certain hot spots such that when the mouse is clicked on one of the hot spot the context menu shows up

Kindly let me know what type of control can I use for this purpose to set as the target for the Context menu

e.g.
 <telerik:ContextMenuControlTarget ControlID = "Hotspot1" />

I cant use ImageMaps as the individual maps dont carry an ID
(problem setting it as a targer)

When I use an empty div, the context menu only shows up when clicked on the border and on the text in the div, I want the div to be empty such that the image behind can be seen at all times, I dont want to fill in the Div with spaces as the image will be scaled, same problem with Panels

Any help is appreciated, thanks in advance
Regards
Karan

2 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 05 Feb 2008, 08:18 AM
Hi Karan,

An interesting inquiry indeed. The quickest solution that comes to my mind is using transparent images over the emf image, which will have the context menu.

The other option is just adding a handler to the contextmenu event of the image and open the context menu by using its showAt method. The Popup menu example demonstrates the showAt method.

Let me know if I can help further.

Kind regards,
Erjan Gavalji
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Karan
Top achievements
Rank 1
answered on 06 Feb 2008, 12:07 AM
Hi Erjan,

Thanks for the help, I ended up putting a transparent image as a background image on the div, and setting the div id as the targer for the context menu, which solves the problem.

Thanks and Regards
Karan
Tags
Menu
Asked by
Karan
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Karan
Top achievements
Rank 1
Share this question
or