How to use hotspots?

How to use hotspots?

Postby Roger Seiler » Tue Feb 28, 2006 4:25 pm

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
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Antonio Linares » Wed Mar 01, 2006 7:35 am

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

Postby reinaldocrespo » Wed Mar 15, 2006 12:02 am

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  Expand view  RUN
   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
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby Antonio Linares » Wed Mar 15, 2006 5:48 pm

Roger, Reinaldo,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rochinha » Wed Oct 04, 2006 1:01 pm

Antonio

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

tanks.

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

Postby RAMESHBABU » Wed Oct 04, 2006 2:12 pm

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
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Antonio Linares » Wed Oct 04, 2006 5:13 pm

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

Postby Gale FORd » Wed Oct 04, 2006 7:41 pm

I have uploaded a copy of hotspot.zip

http://hyperupload.com/download/023041e ... t.zip.html
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Postby Antonio Linares » Wed Oct 04, 2006 8:24 pm

Gale,

Thanks!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rochinha » Thu Oct 05, 2006 12:20 am

Good

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

Postby Rochinha » Thu Oct 05, 2006 12:32 am

??????

The file is empty!

:cry:
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby James Bott » Thu Oct 05, 2006 2:03 am

Rochina,

>The file is empty!

Mine download wasn't. Try downloading it again.

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

Postby Rochinha » Thu Oct 05, 2006 8:58 pm

Ohhhh yes!!!


thanks
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests