Ver Mensaje Individual
  #2  
Antiguo 02-06-2016
Avatar de AgustinOrtu
[AgustinOrtu] AgustinOrtu is offline
Miembro Premium
NULL
 
Registrado: ago 2013
Ubicación: Argentina
Posts: 1.858
Reputación: 15
AgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en brutoAgustinOrtu Es un diamante en bruto
Al parecer, los eventos en Delphi son identificados mediante TTypeKind.tkMethod

Entonces, podes hacer esto:

Código Delphi [-]
uses
  Rtti;

procedure TForm1.Button1Click(Sender: TObject);
var
  c: TRttiContext;
  &Type: TRttiType;
  Prop: TRttiProperty;
begin
  Memo1.Clear;
  &Type := c.GetType(TButton);
  for Prop in &Type.GetProperties do
  begin
    if Prop.PropertyType.TypeKind = TTypeKind.tkMethod then
      Memo1.Lines.Add(Prop.ToString);
  end;
end;

Salida:

Código Delphi [-]
property OnClick: TNotifyEvent
property OnContextPopup: TContextPopupEvent
property OnDragDrop: TDragDropEvent
property OnDragOver: TDragOverEvent
property OnDropDownClick: TNotifyEvent
property OnEndDock: TEndDragEvent
property OnEndDrag: TEndDragEvent
property OnEnter: TNotifyEvent
property OnExit: TNotifyEvent
property OnKeyDown: TKeyEvent
property OnKeyPress: TKeyPressEvent
property OnKeyUp: TKeyEvent
property OnMouseActivate: TMouseActivateEvent
property OnMouseDown: TMouseEvent
property OnMouseEnter: TNotifyEvent
property OnMouseLeave: TNotifyEvent
property OnMouseMove: TMouseMoveEvent
property OnMouseUp: TMouseEvent
property OnStartDock: TStartDockEvent
property OnStartDrag: TStartDragEvent
property OnDropDownClick: TNotifyEvent
property WindowProc: TWndMethod
property OnGesture: TGestureEvent
Responder Con Cita