Classes
Previous Top 

In the script editor there is a tree to the right that list several classes. All the classes can be used in a script. This small example demonstrate how classes can be used. You can copy and paste it into the script editor and run it from there. And, as you can see, it's a pascal script.

var
  f: TForm;
  b: TButton;

// Executed when the user click on the button
procedure ButtonClick(Sender: TButton);
begin
  ShowMessage(Sender.Name);
  f.ModalResult := mrOk;
end;

// Executed when the user move the mouse over the button
procedure ButtonMouseMove(Sender: TButton);
begin
  b.Caption := 'Moved over';
end;

// Main procedure
begin
  // Create a dialog and set the caption to "Test it!"
  f := TForm.Create(nil);
  f.Caption := 'Test it!';
  f.BorderStyle := bsDialog;
  f.Position := poScreenCenter;

  // Add a button to the dialog
  b := TButton.Create(f);
  b.Name := 'Button1';
  b.Parent := f;
  b.SetBounds(10, 10, 85, 25);
  b.Caption := 'Test';

  // Set event handlers to point to the procedures above
  b.OnClick := @ButtonClick;  { same as b.OnClick := 'ButtonClick' }
  b.OnMouseMove := @ButtonMouseMove;

  // Show the dialog
  f.ShowModal;
  f.Free;
end.


Classes and there properties, methods and event handlers.
Class names are in bold and the inherited class within braces.

Classes.pas

TObject
constructor TObject.Create
procedure TObject.Free

TPersistent (TObject)
procedure TPersistent.Assign(Source: TPersistent)

TList (TObject)
function TList.Add(Item: TObject): Integer
procedure TList.Clear
procedure TList.Delete(Index: Integer)
function TList.IndexOf(Item: TObject): Integer
procedure TList.Insert(Index: Integer; Item: TObject)
function TList.Remove(Item: TObject): Integer
property TList.Count
property TList.Items

TStrings (TPersistant)
function TStrings.Add(const S: string): Integer
function TStrings.AddObject(const S: string; AObject: TObject): Integer
procedure TStrings.Clear
procedure TStrings.Delete(Index: Integer)
function TStrings.IndexOf(const S: string): Integer
function TStrings.IndexOfName(const Name: string): Integer
function TStrings.IndexOfObject(AObject: TObject): Integer
procedure TStrings.Insert(Index: Integer; const S: string)
procedure TStrings.InsertObject(Index: Integer; const S: string; AObject: TObject)
procedure TStrings.LoadFromFile(const FileName: string)
procedure TStrings.LoadFromStream(Stream: TStream)
procedure TStrings.SaveToFile(const FileName: string)
procedure TStrings.SaveToStream(Stream: TStream)
property TStrings.CommaText
property TStrings.Count
property TStrings.Names
property TStrings.Objects
property TStrings.Values
property TStrings.Strings
property TStrings.Text

TStringList (TStrings)
function TStringList.Find(s: String; var Index: Integer): Boolean
procedure TStringList.Sort
property TStringList.Duplicates
property TStringList.Sorted

TStream (TObject)
function TStream.Read(Buffer: string; Count: Longint): Longint
function TStream.Write(Buffer: string; Count: Longint): Longint
function TStream.Seek(Offset: Longint; Origin: Word): Longint
function TStream.CopyFrom(Source: TStream; Count: Longint): Longint
property TStream.Position
property TStream.Size

TFileStream (TStream)
constructor TFileStream.Create(Filename: String; Mode: Word)

TMemoryStream (TStream)
procedure TMemoryStream.Clear
procedure TMemoryStream.LoadFromStream(Stream: TStream)
procedure TMemoryStream.LoadFromFile(Filename: String)
procedure TMemoryStream.SaveToStream(Stream: TStream)
procedure TMemoryStream.SaveToFile(Filename: String)

TComponent (TPersistant)
constructor TComponent.Create(AOwner: TComponent)
property TComponent.Owner

TfsXMLItem
constructor TfsXMLItem.Create
procedure TfsXMLItem.AddItem(Item: TfsXMLItem)
procedure TfsXMLItem.Clear
procedure TfsXMLItem.InsertItem(Index: Integer; Item: TfsXMLItem)
function TfsXMLItem.Add: TfsXMLItem
function TfsXMLItem.Find(const Name: String): Integer
function TfsXMLItem.FindItem(const Name: String): TfsXMLItem
function TfsXMLItem.Prop(const Name: String): String
function TfsXMLItem.Root: TfsXMLItem
property TfsXMLItem.Data
property TfsXMLItem.Count
property TfsXMLItem.Items
property TfsXMLItem.Name
property TfsXMLItem.Parent
property TfsXMLItem.Text

TfsXMLDocument
constructor TfsXMLDocument.Create
procedure TfsXMLDocument.SaveToStream(Stream: TStream)
procedure TfsXMLDocument.LoadFromStream(Stream: TStream)
procedure TfsXMLDocument.SaveToFile(const FileName: String)
procedure TfsXMLDocument.LoadFromFile(const FileName: String)
property TfsXMLDocument.Root

const fmCreate
const fmOpenRead
const fmOpenWrite
const fmOpenReadWrite
const fmShareExclusive
const fmShareDenyWrite
const fmShareDenyNone
const soFromBeginning
const soFromCurrent
const soFromEnd
type TDuplicates


Graphics.pas

TFont
TPen
TBrush
TCanvas (TPersistant)
procedure TCanvas.Draw(X, Y: Integer; Graphic: TGraphic)
procedure TCanvas.Ellipse(X1, Y1, X2, Y2: Integer)
procedure TCanvas.LineTo(X, Y: Integer)
procedure TCanvas.MoveTo(X, Y: Integer)
procedure TCanvas.Rectangle(X1, Y1, X2, Y2: Integer)
procedure TCanvas.RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer)
procedure TCanvas.StretchDraw(X1, Y1, X2, Y2: Integer; Graphic: TGraphic)
function TCanvas.TextHeight(const Text: string): Integer
procedure TCanvas.TextOut(X, Y: Integer; const Text: string)
function TCanvas.TextWidth(const Text: string): Integer
property TCanvas.Pixels

TGraphic (TPersistant)
procedure TGraphic.LoadFromFile(const Filename: string)
procedure TGraphic.SaveToFile(const Filename: string)
property TGraphic.Height
property TGraphic.Width

TMetafile
TMetafileCanvas
TBitmap (TGraphic)
property TBitmap.Canvas

type TFontStyles
type TFontPitch
type TPenStyle
type TPenMode
type TBrushStyle


StdCtrls.pas and Forms.pas (Classes inherit methods from the classes above them. E.g. TMemo inherit TWinControl and TControl)

TControl (TPersistant)
property TControl.Parent
procedure TControl.Hide
procedure TControl.Show
procedure TControl.SetBounds(ALeft, ATop, AWidth, AHeight: Integer)
event TControl.OnCanResize
event TControl.OnClick
event TControl.OnDblClick
event TControl.OnMouseDown
event TControl.OnMouseMove
event TControl.OnMouseUp
event TControl.OnResize

TWinControl (TControl)
procedure TWinControl.SetFocus
event TWinControl.OnEnter
event TWinControl.OnExit
event TWinControl.OnKeyDown
event TWinControl.OnKeyPress
event TWinControl.OnKeyUp

TCustomControl
TGraphicControl
TGroupBox
TLabel
TEdit
TMemo (TWinControl)

TCustomComboBox (TWinControl)
property TCustomComboBox.DroppedDown
property TCustomComboBox.ItemIndex

TComboBox
TButton
TCheckBox
TRadioButton (TWinControl)

TCustomListBox (TWinControl)
property TCustomListBox.ItemIndex
property TCustomListBox.SelCount
property TCustomListBox.Selected

TListBox
TControlScrollBar
TScrollingWinControl
TScrollBox (TWinControl)

TCustomForm (TWinControl)
procedure TCustomForm.Close
procedure TCustomForm.Hide
procedure TCustomForm.Show
function TCustomForm.ShowModal: Integer
event TCustomForm.OnActivate
event TCustomForm.OnClose
event TCustomForm.OnCloseQuery
event TCustomForm.OnCreate
event TCustomForm.OnDestroy
event TCustomForm.OnDeactivate
event TCustomForm.OnHide
event TCustomForm.OnPaint
event TCustomForm.OnShow
property TCustomForm.ModalResult

TForm (TCustomForm)

type TModalResult
type TCursor
type TShiftState
type TAlignment
type TAlign
type TMouseButton
type TAnchors
type TBevelCut
type TTextLayout
type TEditCharCase
type TScrollStyle
type TComboBoxStyle
type TCheckBoxState
type TListBoxStyle
type TFormBorderStyle
type TWindowState
type TFormStyle
type TBorderIcons
type TPosition
type TCloseAction


ExtCtrls.pas

TShape (TControl)

TPaintBox (TControl)
event TPaintBox.OnPaint

TImage
TBevel (TControl)

TTimer (TComponent)
event TTimer.OnTimer

TPanel
TSplitter
TBitBtn
TSpeedButton (TWinControl)

TCheckListBox (TWinControl)
property TCheckListBox.Checked

TTabControl
TTabSheet (TWinControl)

TPageControl (TWinControl)
procedure TPageControl.SelectNextPage(GoForward: Boolean)
property TPageControl.PageCount
property TPageControl.Pages

TStatusPanel (TPersistant)

TStatusPanels (TPersistant)
function TStatusPanels.Add: TStatusPanel
property TStatusPanels.Items

TStatusBar (TWinControl)

TTreeNode (TPersistant)
procedure TTreeNode.Delete
function TTreeNode.EditText: Boolean
property TTreeNode.Count
property TTreeNode.Data
property TTreeNode.ImageIndex
property TTreeNode.SelectedIndex
property TTreeNode.StateIndex
property TTreeNode.Text

TTreeNodes (TPersistant)
function TTreeNodes.Add(Node: TTreeNode; const S: string): TTreeNode
function TTreeNodes.AddChild(Node: TTreeNode; const S: string): TTreeNode
procedure TTreeNodes.BeginUpdate
procedure TTreeNodes.Clear
procedure TTreeNodes.Delete(Node: TTreeNode)
procedure TTreeNodes.EndUpdate
property TTreeNodes.Count
property TTreeNodes.Item

TTreeView (TWinControl)
procedure TTreeView.FullCollapse
procedure TTreeView.FullExpand
property TTreeView.Selected
property TTreeView.TopItem

TTrackBar
TProgressBar
TListColumn (TPersistant)

TListColumns (TPersistant)
function TListColumns.Add: TListColumn
property TListColumns.Items

TListItem (TPersistant)
procedure TListItem.Delete
function TListItem.EditCaption: Boolean
property TListItem.Caption
property TListItem.Checked
property TListItem.Data
property TListItem.ImageIndex
property TListItem.Selected
property TListItem.StateIndex
property TListItem.SubItems

TListItems (TPersistant)
function TListItems.Add: TListItem
procedure TListItems.BeginUpdate
procedure TListItems.Clear
procedure TListItems.Delete(Index: Integer)
procedure TListItems.EndUpdate
property TListItems.Count
property TListItems.Item

TIconOptions
TListView
TToolButton
TToolBar
TMonthCalColors
TDateTimePicker
TMonthCalendar (TWinControl)

type TShapeType
type TBevelStyle
type TBevelShape
type TResizeStyle
type TButtonLayout
type TButtonState
type TButtonStyle
type TBitBtnKind
type TNumGlyphs
type TTabPosition
type TTabStyle
type TStatusPanelStyle
type TStatusPanelBevel
type TSortType
type TTrackBarOrientation
type TTickMark
type TTickStyle
type TProgressBarOrientation
type TIconArrangement
type TListArrangement
type TViewStyle
type TToolButtonStyle
type TDateTimeKind
type TDTDateMode
type TDTDateFormat
type TDTCalAlignment
type TCalDayOfWeek


Dialogs.pas

TCommonDialog (TComponent)
function TCommonDialog.Execute: Boolean

TOpenDialog
TSaveDialog
TColorDialog
TFontDialog
TPrintDialog
TPrinterSetupDialog (TCommonDialog)

type TOpenOptions
type TFileEditStyle
type TColorDialogOptions
type TFontDialogOptions
type TFontDialogDevice
type TPrintRange
type TPrintDialogOptions


DB.pas

TField (TComponent)
property TField.AsBoolean
property TField.AsCurrency
property TField.AsDateTime
property TField.AsFloat
property TField.AsInteger
property TField.AsDate
property TField.AsTime
property TField.AsString
property TField.AsVariant
property TField.DataType
property TField.DisplayName
property TField.DisplayText
property TField.IsNull
property TField.Size
property TField.Value

TFields (TObject)
property TFields.Fields

TStringField
TNumericField
TIntegerField
TSmallIntField
TWordField
TAutoIncField
TFloatField
TCurrencyField
TBooleanField
TDateTimeField
TDateField
TTimeField
TBinaryField
TBytesField
TVarBytesField
TBCDField (TField)

TBlobField (TField)
procedure TBlobField.LoadFromFile(const FileName: String)
procedure TBlobField.LoadFromStream(Stream: TStream)
procedure TBlobField.SaveToFile(const FileName: String)
procedure TBlobField.SaveToStream(Stream: TStream)

TMemoField
TGraphicField
TFieldDef
TFieldDefs (TBlobField)
property TFieldDefs.Items

TDataSource (TComponent)
type TBookmark

TDataSet (TComponent)
procedure TDataSet.Open
procedure TDataSet.Close
procedure TDataSet.First
procedure TDataSet.Last
procedure TDataSet.Next
procedure TDataSet.Prior
procedure TDataSet.Cancel
procedure TDataSet.Delete
procedure TDataSet.Post
procedure TDataSet.Append
procedure TDataSet.Insert
procedure TDataSet.Edit
function TDataSet.FieldByName(const FieldName: string): TField
procedure TDataSet.GetFieldNames(List: TStrings)
function TDataSet.FindFirst: Boolean
function TDataSet.FindLast: Boolean
function TDataSet.FindNext: Boolean
function TDataSet.FindPrior: Boolean
procedure TDataSet.FreeBookmark(Bookmark: TBookmark)
function TDataSet.GetBookmark: TBookmark
procedure TDataSet.GotoBookmark(Bookmark: TBookmark)
function TDataSet.Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean
function TDataSet.IsEmpty: Boolean
property TDataSet.Bof
property TDataSet.Eof
property TDataSet.FieldCount
property TDataSet.FieldDefs
property TDataSet.Fields
property TDataSet.Filter
property TDataSet.Filtered
property TDataSet.FilterOptions
property TDataSet.Active

TParam (TPersistant)
procedure TParam.Clear
property TParam.Bound
property TParam.IsNull
property TParam.Text
property TParam.AsBoolean
property TParam.AsCurrency
property TParam.AsDateTime
property TParam.AsFloat
property TParam.AsInteger
property TParam.AsDate
property TParam.AsTime
property TParam.AsString
property TParam.AsVariant

TParams (TPersistant)
function TParams.ParamByName(const Value: string): TParam
function TParams.FindParam(const Value: string): TParam
property TParams.Items

type TFieldType
type TBlobStreamMode
type TLocateOptions
type TFilterOptions
type TParamType


DBCtrls.pas

TDBEdit
TDBText
TDBCheckBox (TWinControl)
property TDBCheckBox.Checked

TDBComboBox (TWinControl)
property TDBComboBox.Text

TDBListBox
TDBRadioGroup (TWinControl)
property TDBRadioGroup.ItemIndex
property TDBRadioGroup.Value

TDBMemo
TDBImage
TDBNavigator
TDBLookupControl (TWinControl)
property TDBLookupControl.KeyValue

TDBLookupListBox (TDBLookupControl)
property TDBLookupListBox.SelectedItem

TDBLookupComboBox (TDBLookupControl)
property TDBLookupComboBox.Text

TColumnTitle
TColumn
TDBGridColumns (TPersistant)
function TDBGridColumns.Add: TColumn
property TDBGridColumns.Items

TDBGrid (TWinControl)

type TButtonSet
type TColumnButtonStyle
type TDBGridOptions


BDE

TSession
TDatabase
TBDEDataSet
TDBDataSet
TTable (TComponent)
procedure TTable.CreateTable
procedure TTable.DeleteTable
procedure TTable.EmptyTable
function TTable.FindKey(const KeyValues: array): Boolean
procedure TTable.FindNearest(const KeyValues: array)
procedure TTable.RenameTable(const NewTableName: string)

TQuery (TDBDataSet)
procedure TQuery.ExecSQL
function TQuery.ParamByName(const Value: string): TParam
procedure TQuery.Prepare
property TQuery.ParamCount

TStoredProc (TDBDataSet)
procedure TStoredProc.ExecProc
function TStoredProc.ParamByName(const Value: string): TParam
procedure TStoredProc.Prepare
property TStoredProc.ParamCount

type TTableType
type TParamBindMode


ADO

TADOConnection
TParameter
TParameters (TPersistant)
property TParameters.Items

TCustomADODataSet
TADOTable
TADOQuery (TDataSet)
procedure TADOQuery.ExecSQL

TADOStoredProc (TDataSet)
procedure TADOStoredProc.ExecProc

type TDataType


IBX

TIBDataBase
TIBTransaction
TIBCustomDataSet
TIBTable
TIBQuery
procedure TIBQuery.ExecSQL

TIBStoredProc
procedure TIBStoredProc.ExecProc


TeeChart

TChartValueList
TChartAxisTitle
TChartAxis
TCustomChartLegend
TChartLegend
TSeriesMarks
TChartGradient
TChartWall
TChartBrush
TChartTitle
TChartSeries
procedure TChartSeries.Clear
procedure TChartSeries.Add(const AValue: Double; const ALabel: String; AColor: TColor)

TSeriesPointer
TCustomSeries
TLineSeries
TPointSeries
TAreaSeries
TCustomBarSeries
TBarSeries
THorizBarSeries
TCircledSeries
TPieSeries
TFastLineSeries
TCustomChart
TChart

type TChartValue
type TLegendStyle
type TLegendAlignment
type TLegendTextStyle
type TChartListOrder
type TGradientDirection
type TSeriesMarksStyle
type TAxisLabelStyle
type THorizAxis
type TVertAxis
type TTeeBackImageMode
type TPanningMode
type TSeriesPointerStyle
type TMultiArea
type TMultiBar
type TBarStyle