Hi!
I need Onclic event for TJPEGImage. I have a constructor that creates tjpegimages and a procedure that adds them to tscrollbox. I need to be able to click on the image on the tscrollbox. I tried to use TControl with no luck. This is the code I used:
TControl = Class(TThumb)
Private
FOnClick: TNotifyEvent;
Protected
Procedure Click; dynamic;
Property OnClick:TNotifyEvent read FOnClick write FOnClick;
end;
and the click procedure:
procedure Tcontrol.Click;
begin
if Assigned(FonClick) then FonClick(Self);
end;
Help in code is good :,)
Hare is the constructor:
type TThumb = class(TGraphicControl)
fpics : TJPEGImage;
private
procedure getpic(value : tjpegimage);
public
procedure paint; override;
constructor create(aowner: TComponent); override;
destructor destroy; override;
published
property pic : tjpegimage write getpic;
end;
thanks!
I need Onclic event for TJPEGImage. I have a constructor that creates tjpegimages and a procedure that adds them to tscrollbox. I need to be able to click on the image on the tscrollbox. I tried to use TControl with no luck. This is the code I used:
TControl = Class(TThumb)
Private
FOnClick: TNotifyEvent;
Protected
Procedure Click; dynamic;
Property OnClick:TNotifyEvent read FOnClick write FOnClick;
end;
and the click procedure:
procedure Tcontrol.Click;
begin
if Assigned(FonClick) then FonClick(Self);
end;
Help in code is good :,)
Hare is the constructor:
type TThumb = class(TGraphicControl)
fpics : TJPEGImage;
private
procedure getpic(value : tjpegimage);
public
procedure paint; override;
constructor create(aowner: TComponent); override;
destructor destroy; override;
published
property pic : tjpegimage write getpic;
end;
thanks!