Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Creating Image Maps

Reply
Thread Tools

Creating Image Maps

 
 
Aaron
Guest
Posts: n/a
 
      12-24-2004
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

 
Reply With Quote
 
 
 
 
M.E.Farmer
Guest
Posts: n/a
 
      12-24-2004
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

 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      12-24-2004
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
 
Reply With Quote
 
Aaron
Guest
Posts: n/a
 
      12-25-2004
Thanks for the responses guys!

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



 
Reply With Quote
 
Steve Holden
Guest
Posts: n/a
 
      12-27-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MSN maps vs. Google maps Ralph Fox NZ Computing 0 07-30-2007 10:30 AM
STL: Map of maps possible, but no multi-map of maps? Workarounds? Marcus C++ 2 12-09-2005 06:34 AM
std::maps within std::maps -- optimisation Simon Elliott C++ 4 03-10-2005 10:11 AM
GDI+ and Image Maps Kevin Vaughn ASP .Net 0 07-11-2003 06:56 PM
Image maps and shopping carts chaos/dollheads HTML 0 07-05-2003 12:35 AM



Advertisments