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

How to create a popup menu with icons

Hello everyone

I wonder if exists any way of creating a popup menu (ContextMenu) where
every option has an own icon.

Thanks!
Aug 29 '05 #1
2 1399
Ignasi Giró wrote:
Hello everyone

I wonder if exists any way of creating a popup menu (ContextMenu) where
every option has an own icon.

Thanks!

Ignasi,

with client side js it's a simple matter of intercepting the
oncontextmenu event (either from the document or element level - the
event bubbles). Once you have that it's up to you what you display in
place of the context menu. Could be tables, divs, or my personal
favourite for semantic markup DL/DT/DD. The event object can be queried
to pick up the x/y location of the screen the menu should be placed.

From the intercepting function, simply return true or false to allow
the normal context menu to appear.

Hope this helps.

Ric.
Aug 29 '05 #2
Thx for your reply Ric

I forgot to mention that my program is made with VBNET, but don't worry
because I've already found an external component that solves my problem.
(Janus)

Thx a lot!
"Ric Paton" <ri*********************@gmail.com> escribió en el mensaje
news:eN**************@tk2msftngp13.phx.gbl...
Ignasi Giró wrote:
Hello everyone

I wonder if exists any way of creating a popup menu (ContextMenu) where
every option has an own icon.

Thanks!

Ignasi,

with client side js it's a simple matter of intercepting the
oncontextmenu event (either from the document or element level - the
event bubbles). Once you have that it's up to you what you display in
place of the context menu. Could be tables, divs, or my personal
favourite for semantic markup DL/DT/DD. The event object can be queried
to pick up the x/y location of the screen the menu should be placed.

From the intercepting function, simply return true or false to allow
the normal context menu to appear.

Hope this helps.

Ric.

Aug 30 '05 #3

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

Similar topics

2
by: dennishancy | last post by:
On my web site, I have a "Links" link. Rather than create a separate HTML file listing all the links, I'd like to create a popup menu (not sure if that's the official name or not). So, when I...
2
by: SamSpade | last post by:
I use to get popup events when I checked out the menu coding. That was a while ago. Something I did in the interim must have suppressed those events because I just noticed I don't get them any...
5
by: Robert Smith | last post by:
Hello, I have often seen system tray icons that you click on and a popup menu appears. Is it possible to do this in Visual basic.net or are there any controls that allow this to be achieved. ...
2
by: Ignasi Giró | last post by:
Hello everyone I wonder if exists any way of creating a popup menu (ContextMenu) where every option has an own icon. Thanks!
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
0
by: trullock | last post by:
Hi, I have a windows forms app which exists only in the tray, a window is never visible. I set showintaskbar = false and windowstate = minimized on the form. I want to display a popup menu...
0
by: newwin | last post by:
How i create a popup menu on switchboard form, like on switchboard form, when user clicks the button a popup menu is displayed then user can selects one of them using access 2007. Please tell me, the...
23
by: kigoobe | last post by:
Hi friends, I'm having a menu like this - http://www.kigoobe.com/offshoring/bugs/javascript/treeMenuCheckToggle.gif that I've fetched from the database, using recursive function, where data...
9
by: Academia | last post by:
ContextMenu has a Popup event but MainMenu does not. I need Popup with MainMenu. Do you know anyway to simulate it? Thanks in advance
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.