Navigation: TextEd > Extension and Scripts > Classes (non-visual) >

General

 

 

 

 

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.


 

 

C++ script


 

TForm f;
TButton b;
 
// Executed when the user click on the button
void ButtonClick(TButton Sender) {
  ShowMessage(Sender.Name);
  f.ModalResult = mrOk;
}
 
// Executed when the user move the mouse over the button
void ButtonMouseMove(TButton Sender) {
  b.Caption := "Moved over";
}
 
// Main procedure
{
  // Create a dialog and set the caption to "Test it!"
  f = new TForm(nil);
  f.Caption = "Test it!";
  f.BorderStyle = bsDialog;
  f.Position = poScreenCenter;
 
  // Add a button to the dialog
  b = new TButton(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; 
  b.OnMouseMove = &ButtonMouseMove;
 
  // Show the dialog
  f.ShowModal;
  f.Free;
}


 

 

C++ script (Unicode)

 

{

  TTntStringlist ls = TTntStringlist.Create;

  ls.Add("Hello World!");

  ls.Add("Привет мир!");

  Document.SelText = ls.Text;

  ls.Free;

}


 

Classes and there properties, methods and event handlers.

Class names are in bold and the inherited class within braces.


 

TfsXMLItem

 

constructor Create

procedure AddItem(Item: TfsXMLItem)

procedure Clear

procedure InsertItem(Index: Integer; Item: TfsXMLItem)

function Add: TfsXMLItem

function Find(const Name: String): Integer

function FindItem(const Name: String): TfsXMLItem

function Prop(const Name: String): String

function Root: TfsXMLItem

property Data

property Count

property Items

property Name

property Parent

property Text


 

TfsXMLDocument

 

constructor Create

procedure SaveToStream(Stream: TStream)

procedure LoadFromStream(Stream: TStream)

procedure SaveToFile(const FileName: String)

procedure LoadFromFile(const FileName: String)

property Root

 

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)
 

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)


 


 


 


 

 

 

 

 

Copyright © 2024 Rickard Johansson