Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.02.29;
Скачать: CL | DM;

Вниз

Как отследить двойной щелчок по TShape?   Найти похожие ветки 

 
revo   (2004-02-16 14:36) [0]

Как отследить двойной щелчок по TShape?


 
Radionov Alexey ©   (2004-02-16 14:53) [1]

Вот так получилось:

procedure TForm1.Shape1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ssDouble in Shift then
ShowMessage("DoubleClick!");
end;


 
ssk   (2004-02-16 15:02) [2]

а можно еще и так (типа наследник):

unit dmShape;

interface

uses
SysUtils, Classes, Controls, ExtCtrls;

type
TdmShape = class(TShape)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property OnDblClick;
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents("Samples", [TdmShape]);
end;

end.
;-)



Страницы: 1 вся ветка

Текущий архив: 2004.02.29;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.028 c
14-94151
TUser
2004-02-09 13:30
2004.02.29
Apache


11-93825
Кладов
2003-06-06 11:41
2004.02.29
FPC: подключение ресурсов Windows


1-94021
i-s-v
2004-02-16 22:37
2004.02.29
Как сделать, чтобы при изменении размеров отрисовывалася рамка


1-93886
Defunct
2004-02-15 23:35
2004.02.29
Как сравнить две переменные типа TNotifyEvent?


7-94212
Petr7
2003-12-09 20:48
2004.02.29
irda