473,908 Members | 4,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Image Maps

I know this is a thing used primarily on websites..but since python can do
anything ;)

I'm trying to make a clickable image map for my wxPython program.
Basically, I know how to organize the images into one large image in a
panel, but how do I make the individual pieces clickable like webpage
links(in wxPython)? The goal is to add an event handler that displays the
image piece in a different panel, along with attributes. Which I could do
if only I could make the pieces clickable

Any ideas?

Also, if you have any hard to find links on the general area I'm talking
about, I'd like to learn as much as possible.

-thanks

Jul 18 '05 #1
4 5415
Hello Aaron,
You need to check the demo that comes with wxPython if you don't
have it get it. Look under wxHtmlWindow and click the demo tab then
just scroll down and there is a link to it that says IMAGEMAP.
Or in other words RTFD ;)
M.E.Farmer

Jul 18 '05 #2
Aaron wrote:
I know this is a thing used primarily on websites..but since python can do
anything ;)

I'm trying to make a clickable image map for my wxPython program.
Basically, I know how to organize the images into one large image in a
panel, but how do I make the individual pieces clickable like webpage
links(in wxPython)? The goal is to add an event handler that displays the
image piece in a different panel, along with attributes. Which I could do
if only I could make the pieces clickable

Any ideas?

Also, if you have any hard to find links on the general area I'm talking
about, I'd like to learn as much as possible.

Basically, your approach can be completely different under wxPython -
you can use a single image, and then query the mouse click events to
determine which location (and therefore which portion of the image) was
clicked.

You *could* use separate images as well, in which case you would need to
provide callback functions to be called for clicks on the various
sub-portions.

Take a look at the docs for wxEvent, and see if that leads you to
something you can understand.

regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #3
Thanks for the responses guys!

The first option you provided sounds great, Steve. I think I'm gonna try
it that way.

Jul 18 '05 #4
Aaron wrote:
Thanks for the responses guys!

The first option you provided sounds great, Steve. I think I'm gonna try
it that way.

OK. It's usually the easiest way if the subsections are at all regular.
If they are irregular it's often the *only* way!

This is a technique that can also be used on the web (Google for
"client-side image map"), but it's very little-used there.

regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #5

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

Similar topics

4
2223
by: Stanimir Stamenkov | last post by:
I have this kind of construct: http://www.geocities.com/stanio/temp/usemap01.html (an IMG element using MAP described with AREA elements) I'm trying to make it more accessible and currently I'm testing in Lynx. Lynx plays it clever and when I "enter" the map it shows only 3 links no matter there are 5 AREAs (3 point to a same reference). I don't like Lynx displays the 'alt' text and not the link titles
12
2764
by: Major Man | last post by:
Hi, I have this .jpg picture that's 700 x 200. What I wanna do is display it on a 300 x 200 window, and have it scroll left and right, back and forth. Can anyone help this newbie? TIA
0
1481
by: Kevin Vaughn | last post by:
Is it possible to use image maps to divide up a picture acting as an image button? I have created a map of a building, and now I want to have some sort of pop-up messages when certain parts of the building are moused over. The only way I can think to do this (without using javascript), is to divide the image into sections with an image map and have the pop-ups display my info. I've never made an image map before, nor have I dealt with...
1
2058
by: code | last post by:
Hi Grp http://www.books-download.com/?Book=1493-PHP+Hacks+%3a+Tips+%26+Tools+For+Creating+Dynamic+Websites+(Hacks) Description Programmers love its flexibility and speed; designers love its accessibility and convenience. When it comes to creating web sites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million web sites, surpassing
0
1347
by: Hemanth | last post by:
Hello, I'm generating a dynamic image on a website (using php.net/image library) and I want add hyperlinks to certain locations on the image - similar to HTML image map. Could someone pls suggest me a good way of doing this - with/without having to store the dynamic image. TIA, Hemanth
6
4767
by: David Stone | last post by:
I have a simple question about the alt content of area elements within an image map: is it redundant to include phrases such as "link to..." or "jump to..."? My initial thought is 'yes', since the area element implies a link to some other item or page location, but would like to hear what others think. If it helps at all, the page which prompted me to ask the question is this one: ...
10
2660
by: Arnaud Diederen | last post by:
Hello everyone, and happy new year to all c.l.j'ers! No bad code to post, just a question. I wrote a JavaScript application that lets users view an image, and zoom on it. The way I "zoom" is pretty simple, really (I hope that your newsreaders displays text with a monospace font..) :
4
4745
by: Ryan Knopp | last post by:
This is an update from a previous post, I just simplified the code. It seems that I can't get the image map to work with IE7. The page is located here http://www.theknopps.com/test.html and the source below. I can't seem to figure out why IE7 won't recognize the image map. Thanks for your help Ryan
13
5378
by: seegoon | last post by:
Hi all. So: I've put together a page, in which I want several clickable image maps. I've put those together already. The problem with image maps is that they're not very intuitive, so users don't really expect the image to be clickable and accordingly won't even try to. The solution is to have the image highlight whenever the mouse travels over the mapped-out area; I understand that this is quite easy. Some Googling has provided a few...
0
9875
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11335
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9721
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8094
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7244
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5930
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6133
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3354
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.