SRL Archive - OSR Advanced Scripting Tutorials

A list of "most common" TNotifyEvents in SCAR Forms!


Daniel

2008-10-09 06:47:46

A List of the Most Commonly used Pointers in SCAR Forms
By Dan's The Man


Introduction:
This contains a list of the most commonly used TNotifyEvents when used in a SCAR Form. Most TNotifyEvents may have the same name, or same parameters. It doesn't matter. Please take note, that this tutorial only provides the parameters of each TNotifyEvent, since the procedure name, you will decide ;)

Why do you need this information?:
Whenever you use a TNotifyEvent, it can't always be (Sender: TObject) (although the common usage ones are). Each may require more parametres. And if you don't have those parametres, a Type Mismatch will occur. So, that is what this guide is for ;) So you don't have to spend a lot of time figuring them out (which can be hard, trust me).

It's format is as follows:

(Sender: TObject; [Whatever here]);
So you can copy the parameters directly out of this tutorial into your SCAR script ;)

For a quick reference, i have included a contents on the TObject (i.e TLabel, TEdit, etc ;))

Contents:
  • TForm.
  • TLabel.
  • TButton.
  • TBitBtn.
  • TSpeedButton.
  • TComboBox.
  • TEdit.
  • TRichEdit.
  • TMemo.
  • TImage.
  • TShape.
  • TScrollBox.
  • TCheckListBox.
  • TProgressBar.
  • TCheckBox.
  • TRadioButton.
  • TBevel.
  • TTimer.
  • TMainMenu.
  • TPopupMenu.
  • TTabControl.
  • TOpenDialog.
  • TSaveDialog.
  • TFontDialog.
  • TColorDialog.
  • TFindDialog.
  • TReplaceDialog.

OnActivate, OnClick, OnCreate, OnDblClick, OnDeactivate, OnDestroy, OnHide, OnPaint, OnResize, OnShow:
(Sender: TObject);

OnCanResize:
(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean);

OnClose:
(Sender: TObject; var Action: TCloseAction);

OnCloseQuery:
(Sender: TObject; var CanClose: Boolean);

OnKeyDown, OnKeyUp:
(Sender: TObject; var Key: Word; Shift: TShiftState);

OnKeyPress:
(Sender: TObject; var Key: Char);

OnMouseDown, OnMouseUp:
(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

OnMouseMove:
(Sender: TObject; Shift: TShiftState; X, Y: Integer);

Freddy1990

2009-07-21 20:52:28

Hmm, these aren't TNotifyEvents… TNotifyEvent is a specific procedure object type… Neither are they pointers… And SCAR has a tool that has all of these definitions…

(Epic bump)

Naum

2009-07-21 21:14:36

From: Freddy1990
Hmm, these aren't TNotifyEvents… TNotifyEvent is a specific procedure object type… Neither are they pointers… And SCAR has a tool that has all of these definitions…

(Epic bump)


As Freddy, rightly, said:

Tools > Event Handlers List :)

Floor66

2009-07-21 21:32:58

Why are LOTS of things TSomethingSomething

senrath

2009-07-21 21:35:05

From: Floor66
Why are LOTS of things TSomethingSomething


Because it stands for Type. It's just a naming convention.