Page 1 of 1

How to use hotspots?

Posted: Tue Feb 28, 2006 4:25 pm
by Roger Seiler
I seem to recall from some posting years ago that FiveWin has a way of implementing hotspots on top of a bitmap. But I don't remember how to do this and wonder whether this would work with the new transparent brush covering a dialog.

Can someone point me in the right direction, please?

- Roger

Posted: Wed Mar 01, 2006 7:35 am
by Antonio Linares
Roger,

There are several ways to do it:

1. You may keep an array with subarrays containing the areas of the hotspots. When the mouse is clicked you search into those subarrays and fire a related action.

2. Another way is to place a transparent control on top of the bitmap (i.e. a TBtnBmp or a TPanel) with brush NULL, so when it is clicked, its action its fired or its bLClicked codeblock.

Posted: Wed Mar 15, 2006 12:02 am
by reinaldocrespo
Roger/Antonio;

Were you able to get any of these two approaches to work?

I'm dealing with the same situation. Have a timage control on a dialog and want to execute different code if clicked on different areas of the image. I'm trying with the tBmpBtn placed on top of the tImage control, but it is always visible no matter what. If ltransparent set to .t., then the bmpbtn displays as a black box.

Here the code I'm using:

Code: Select all

	DEFINE DIALOG ::odlg NAME "xRayOrders" OF ::oWnd TITLE "Patient Xray Orders" BRUSH oBrush
	REDEFINE BTNBMP aoBtn[ 1 ] ID 101 OF ::oDlg NOBORDER ACTION oSelf:addXray( "Head" ) TOOLTIP "Head xRays"

	REDEFINE BITMAP oImage1 ID 100 OF ::oDlg FILE cPath + "Human_Front.jpg" //CURSOR oCursor //TRANSPARENT
	REDEFINE BITMAP oImage2 ID 200 OF ::oDlg FILE cPath + "Human_Back.jpg" //CURSOR oCursor //TRANSPARENT
	ACTIVATE DIALOG oSelf:oDlg CENTERED ON INIT oSelf:BuildXrayOrdersControls() ;
		Valid SaveBrwState( oSelf:oLbx, "XrayOrders" )
Any ideas?

Thank you,

Reinaldo.

Posted: Wed Mar 15, 2006 5:48 pm
by Antonio Linares
Roger, Reinaldo,

Here you have a working sample:
http://hyperupload.com/download/3041ea2 ... t.zip.html

Posted: Wed Oct 04, 2006 1:01 pm
by Rochinha
Antonio

You can email this file for me in irochinha@itelefonica.com.br?

tanks.

Rochinha

Posted: Wed Oct 04, 2006 2:12 pm
by RAMESHBABU
Mr.Antonio

Clicking on the HotSpots.zip link is resulting to "BAD URL".

Can you please upload it once again.

Thanks

- Ramesh Babu P

Posted: Wed Oct 04, 2006 5:13 pm
by Antonio Linares
Rochinha,

We don't have it, sorry and it looks as the download url is broken.

maybe someone else has it and can help us.

Posted: Wed Oct 04, 2006 7:41 pm
by Gale FORd
I have uploaded a copy of hotspot.zip

http://hyperupload.com/download/023041e ... t.zip.html

Posted: Wed Oct 04, 2006 8:24 pm
by Antonio Linares
Gale,

Thanks!

Posted: Thu Oct 05, 2006 12:20 am
by Rochinha
Good

Thanks to all!!!

Posted: Thu Oct 05, 2006 12:32 am
by Rochinha
??????

The file is empty!

:cry:

Posted: Thu Oct 05, 2006 2:03 am
by James Bott
Rochina,

>The file is empty!

Mine download wasn't. Try downloading it again.

James

Posted: Thu Oct 05, 2006 8:58 pm
by Rochinha
Ohhhh yes!!!


thanks