Re:Bevel Events
Why not just locate the coordinated of the mouse in the image's OnClick
event? Use PtInRect to see if the mouse coordinates exist in the area
(rect) to be checked.
procedure TForm1.Image1Click(Sender: TObject);
var
MPt: TPoint;
MRect: TRect;
begin
MPt := Image1.ScreenToClient(Mouse.CursorPos);
MRect := Image1.ClientRect;
MRect.Top := 0;
MRect.Left := 0;
MRect.Right := 10;
MRect.Bottom := 10;
if PtInRect(MRect,MPt) then
ShowMessage('Upper-left corner clicked');
end;
Just change the values of the Rect to contain the desired coordinates
you want to check. You can use more than one rect and just check them
all if you need to. There's probly a better or more efficient way to do
this but it seems like the easiest solution to me =)
Quote
Kane wrote:
> Hi there!
> i've got a little problem, i've got an image and i need that in a area of
> the image, when the user click in that area, it does some action. the only
> way i've found for that is using a bevel, wich is transparent, but it has no
> events! how can i do that? is there any other componant transparent ??
> TIA
--
1 + 1 = 2 but '1' + '1' = '11'