How to use hotspots?

Post Reply
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

How to use hotspots?

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roger, Reinaldo,

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

Antonio Linares
www.fivetechsoft.com
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Antonio

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

tanks.

Rochinha
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Post by Gale FORd »

I have uploaded a copy of hotspot.zip

http://hyperupload.com/download/023041e ... t.zip.html
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Gale,

Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Good

Thanks to all!!!
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

??????

The file is empty!

:cry:
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Rochina,

>The file is empty!

Mine download wasn't. Try downloading it again.

James
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Ohhhh yes!!!


thanks
Post Reply