Widget for transparent clickable region over an image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Widget for transparent clickable region over an image

Carl Gundel-2
I have a window which is filled with a bitmap image.  Different areas of the image represent actions.  What widget can use as a transparent button for each of these regions?
 
Thanks,
 
-Carl

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Louis LaBrunda
Hi Carl,

There is a thing called "Hot Spot" in the Buttons group that should do what you want but I haven't had much luck using it.  You should look at adding a hook to the image with something like: 

widget addEventHandler: CwConstants::ButtonReleaseMask receiver: self selector: #buttonRelease:clientData:callData: clientData: nil

where widget is from the image object.  When clicked #buttonRelease:clientData:callData: should be called.  From callData (I think) you can get the mouse position and with a little math you should be able to tell where in the image you are.

Ask if you need more help.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Carl Gundel-2
Thanks Louis,
 
I do not have anything in my 8.5.2 image called hot spot, hotspot, etc.  Is this something that I need to load in from somewhere?
 
-Carl

On Tuesday, July 30, 2013 6:06:09 PM UTC-4, Louis LaBrunda wrote:
Hi Carl,

There is a thing called "Hot Spot" in the Buttons group that should do what you want but I haven't had much luck using it.  You should look at adding a hook to the image with something like: 

widget addEventHandler: CwConstants::ButtonReleaseMask receiver: self selector: #buttonRelease:clientData:callData: clientData: nil

where widget is from the image object.  When clicked #buttonRelease:clientData:callData: should be called.  From callData (I think) you can get the mouse position and with a little math you should be able to tell where in the image you are.

Ask if you need more help.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Louis LaBrunda
Hi Carl,

On Wednesday, July 31, 2013 8:59:35 AM UTC-4, Carl Gundel wrote:
Thanks Louis,
 
I do not have anything in my 8.5.2 image called hot spot, hotspot, etc.  Is this something that I need to load in from somewhere?
 
-Carl

If you are working in a Composition Editor window, there are two columns of button icons on the left.  The top of the left column is for button (clickable) types of widgets.  If you click the top left button the second column will show you those widgets.  The sixth one down in the right column is "Hot Spot".

As I said, I haven't had much luck with it, maybe some problem with window z order or something (can't keep the hot spot on top of the image).  Who knows, usually I give up and add my own hook.  But if you can get it to work it sounds like exactly what you need.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Carl Gundel-2
LOL.  I am not using a composition editor.  I am using WindowBuilder.  I do not have a Hot Spot control AFAICT.
 
-Carl

On Wednesday, July 31, 2013 11:11:11 AM UTC-4, Louis LaBrunda wrote:
Hi Carl,

On Wednesday, July 31, 2013 8:59:35 AM UTC-4, Carl Gundel wrote:
Thanks Louis,
 
I do not have anything in my 8.5.2 image called hot spot, hotspot, etc.  Is this something that I need to load in from somewhere?
 
-Carl

If you are working in a Composition Editor window, there are two columns of button icons on the left.  The top of the left column is for button (clickable) types of widgets.  If you click the top left button the second column will show you those widgets.  The sixth one down in the right column is "Hot Spot".

As I said, I haven't had much luck with it, maybe some problem with window z order or something (can't keep the hot spot on top of the image).  Who knows, usually I give up and add my own hook.  But if you can get it to work it sounds like exactly what you need.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Klaus Breker-2
Hi Carl,

don't care about your visual  builder, use #AbtHotSpotView. For beeping when clickeed, it is useable ;)
I did it years ago in an application like Louis. Some trigonometrics to get the mouse cursor position did the job. It were bitmaps which shows bones, muscles or nerves and the task was to raise Tooltips with declaring texts.

Klaus

Am Donnerstag, 1. August 2013 20:41:13 UTC+2 schrieb Carl Gundel:
LOL.  I am not using a composition editor.  I am using WindowBuilder.  I do not have a Hot Spot control AFAICT.
 
-Carl

On Wednesday, July 31, 2013 11:11:11 AM UTC-4, Louis LaBrunda wrote:
Hi Carl,

On Wednesday, July 31, 2013 8:59:35 AM UTC-4, Carl Gundel wrote:
Thanks Louis,
 
I do not have anything in my 8.5.2 image called hot spot, hotspot, etc.  Is this something that I need to load in from somewhere?
 
-Carl

If you are working in a Composition Editor window, there are two columns of button icons on the left.  The top of the left column is for button (clickable) types of widgets.  If you click the top left button the second column will show you those widgets.  The sixth one down in the right column is "Hot Spot".

As I said, I haven't had much luck with it, maybe some problem with window z order or something (can't keep the hot spot on top of the image).  Who knows, usually I give up and add my own hook.  But if you can get it to work it sounds like exactly what you need.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Widget for transparent clickable region over an image

Carl Gundel-2
Thanks, but it isn't at all clear to me how to do this from WindowBuilder.  I can confirm that AbtHotSpotView is in my image, but it does not appear as an option anywhere that I can see.  We do not hand-craft windows here, so if it can't be done from WindowBuilder I will have to do something else.
 
-Carl

On Friday, August 2, 2013 4:58:17 AM UTC-4, Klaus Breker wrote:
Hi Carl,

don't care about your visual  builder, use #AbtHotSpotView. For beeping when clickeed, it is useable ;)
I did it years ago in an application like Louis. Some trigonometrics to get the mouse cursor position did the job. It were bitmaps which shows bones, muscles or nerves and the task was to raise Tooltips with declaring texts.

Klaus

Am Donnerstag, 1. August 2013 20:41:13 UTC+2 schrieb Carl Gundel:
LOL.  I am not using a composition editor.  I am using WindowBuilder.  I do not have a Hot Spot control AFAICT.
 
-Carl

On Wednesday, July 31, 2013 11:11:11 AM UTC-4, Louis LaBrunda wrote:
Hi Carl,

On Wednesday, July 31, 2013 8:59:35 AM UTC-4, Carl Gundel wrote:
Thanks Louis,
 
I do not have anything in my 8.5.2 image called hot spot, hotspot, etc.  Is this something that I need to load in from somewhere?
 
-Carl

If you are working in a Composition Editor window, there are two columns of button icons on the left.  The top of the left column is for button (clickable) types of widgets.  If you click the top left button the second column will show you those widgets.  The sixth one down in the right column is "Hot Spot".

As I said, I haven't had much luck with it, maybe some problem with window z order or something (can't keep the hot spot on top of the image).  Who knows, usually I give up and add my own hook.  But if you can get it to work it sounds like exactly what you need.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.