BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hotspot image

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Falanga Alain
Guest





PostPosted: Tue May 24, 2005 1:06 pm    Post subject: Hotspot image Reply with quote



Hi

I'm looking for an hotspot image component that enable when I click on
a hotspot (region) to display it (select) or hide the current selection
, if I click again (unselect).

Any idea there ? :)

Alan

--
++sign
A.Falanga
"The French Frog TeamZed Member"

Back to top
Bruno Fierens [tmssoftwar
Guest





PostPosted: Tue May 24, 2005 1:23 pm    Post subject: Re: Hotspot image Reply with quote



You can do this with the THotSpotImage component,
you can toggle each Hotspot's Down property to keep it shown as down
(selected) on click.
See http://www.tmssoftware.com/hsimg.htm

Bruno


Back to top
eshipman
Guest





PostPosted: Wed May 25, 2005 4:13 pm    Post subject: Re: Hotspot image Reply with quote



In article <mn.c38a7d555b734017.10843 (AT) laposte (DOT) net>, afalanga~r~emove-this (AT) laposte (DOT) net says...
Quote:
Hi

I'm looking for an hotspot image component that enable when I click on
a hotspot (region) to display it (select) or hide the current selection
, if I click again (unselect).


You looking for somethign to place on top of a TIMage and have it
react to mouse events?

You can modify this to your needs:

(*
TEXSHotSpot - Eddie Shipman

HotSpot Component which allows developers to insert a "HotSpot" on top of
an image or panel but lets the background show through.


*******************************************************************************
New Property: ShowBorder-

Use this if you want a border to show around the hotspot when the mouse
is over it. Similar to the flat speedbutton look.
*)


unit EXSHotSpot;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
extctrls, StdCtrls;

type
TEXSHotSpot = class(TGraphicControl)
private
{ Private declarations }
FMouseInControl: Boolean;
FShowBorder : Boolean;
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
procedure DrawBorder;
function GetShowBorder: Boolean;
procedure SetShowBorder(Value: Boolean);
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
{ Published declarations }
property Align;
property Enabled;
property OnClick;
property OnDblClick;
property OnMouseDown;
property OnMouseUp;
property OnMouseMove;
property OnDragDrop;
property OnEndDrag;
property ShowBorder: Boolean read GetShowBorder write SetShowBorder;
property ShowHint;
property Visible;
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Samples', [TEXSHotSpot]);
end;

procedure TEXSHotSpot.DrawBorder;
var
R: TRect;
begin
R := ClientRect;
InflateRect(R, -1, -1);
Frame3D(Canvas, R, clBtnHighlight, clBtnShadow, 1);
end;

procedure TEXSHotSpot.CMMouseEnter(var Message: TMessage);
begin
inherited;
if not FMouseInControl and Enabled then
begin
FMouseInControl := True;
if FShowBorder then
DrawBorder;
end;
end;

procedure TEXSHotSpot.CMMouseLeave(var Message: TMessage);
begin
inherited;
if FMouseInControl and Enabled then
begin
FMouseInControl := False;
Invalidate;
end;
end;

constructor TEXSHotSpot.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := ControlStyle + [csReplicatable];
Height := 105;
Width := 105;
end;

destructor TEXSHotSpot.Destroy;
begin
inherited Destroy;
end;

function TEXSHotSpot.GetShowBorder: Boolean;
begin
Result :=FShowBorder;
end;

procedure TEXSHotSpot.SetShowBorder(Value: Boolean);
begin
if Value <> FShowBorder then
FShowBorder := Value;
Repaint;
end;



end.

Back to top
Trevor Keegan
Guest





PostPosted: Wed May 25, 2005 11:54 pm    Post subject: Re: Hotspot image Reply with quote

Hi,

Take a look at JfControls. www.jfactivesoft.com

Regards
Trevor Keegan


Back to top
Falanga Alain
Guest





PostPosted: Thu May 26, 2005 5:12 am    Post subject: Re: Hotspot image - Thanks to all Reply with quote

Falanga Alain a utilisé son clavier pour écrire :
Quote:
Hi

I'm looking for an hotspot image component that enable when I click on a
hotspot (region) to display it (select) or hide the current selection , if I
click again (unselect).

Any idea there ? :)

Alan

Thanks to all for your answers and time you take to help me.

Greetings,
Alan

--
++sign
A.Falanga
"The French Frog TeamZed Member"


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.